This article mainly introduces the detailed explanation and examples of the MySQL database source command. Friends who need it can refer to
The detailed explanation and examples of the MySQL database source command
MySQL database source command, which is a database import command. The usage of the source command is very simple. First, you need to enter the command line management interface of the MySQL database, then select the database to be imported, and execute the source command. As shown below.
MySql database source command
mysql> use test Database changed mysql> set names utf8; Query OK, 0 rows affected (0.00 sec) mysql> source C:/test.sql Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.33 sec) Query OK, 0 rows affected (0.07 sec) Query OK, 1 row affected (0.02 sec) Query OK, 1 row affected (0.03 sec) Query OK, 1 row affected (0.02 sec) mysql> set names gbk; Query OK, 0 rows affected (0.00 sec)
Tips:
1. In Windows, the file path should use "/" to replace the default path character "\", such as:
mysql> source C:/test.sql
2. Make sure the character encoding of the script file (.sql / .ddl) is utf8;
3. Before running the source command, execute the command: set names utf8;
mysql> set names utf8; mysql> source C:/test.sql
4. If you need to correctly view Chinese on the command line after running the source command, first execute the command: set names gbk; modify the command line window character encoding. As follows:
mysql> set names gbk; mysql> select * from user;
The above is the detailed content of Detailed explanation of the source command in MySQL database. For more information, please follow other related articles on the PHP Chinese website!

相信很多朋友在Windows下都习惯用SourceInsight来阅读分析源代码了,对于LINUX下面的工具,确实有比较高效的,配置起来起对比较麻烦,也比较繁琐,相信很多人肯定希望能在Linux下面也能用到SourceInsight,下面小编将为大家带来Ubuntu中SourceInsight的使用详解!一起去看看吧!这是我的系统信息:Linuxgavin-laptop2.6.32-40-generic#87-UbuntuSMPTueMar600:56:56UTC2012x86_64GNU/Li

在mysql中,可以利用char()和REPLACE()函数来替换换行符;REPLACE()函数可以用新字符串替换列中的换行符,而换行符可使用“char(13)”来表示,语法为“replace(字段名,char(13),'新字符串') ”。

source是切换输入信号源或选择不同的输入源的按键。通常出现在电视、投影仪、音响系统、电脑显示器等设备上。在电视上,source按键可以让用户切换不同的输入源,从而在电视上播放不同的内容。在投影仪上,source按键的作用类似,可以将不同的设备连接到投影仪上。在音响系统上,source按键用于切换不同的音频输入源。在电脑显示器上,source按键的作用与电视和投影仪类似等等。

mysql的msi与zip版本的区别:1、zip包含的安装程序是一种主动安装,而msi包含的是被installer所用的安装文件以提交请求的方式安装;2、zip是一种数据压缩和文档存储的文件格式,msi是微软格式的安装包。

转换方法:1、利用cast函数,语法“select * from 表名 order by cast(字段名 as SIGNED)”;2、利用“select * from 表名 order by CONVERT(字段名,SIGNED)”语句。

本篇文章给大家带来了关于mysql的相关知识,其中主要介绍了关于MySQL复制技术的相关问题,包括了异步复制、半同步复制等等内容,下面一起来看一下,希望对大家有帮助。

本篇文章给大家带来了关于mysql的相关知识,其中主要介绍了mysql高级篇的一些问题,包括了索引是什么、索引底层实现等等问题,下面一起来看一下,希望对大家有帮助。

在mysql中,可以利用REGEXP运算符判断数据是否是数字类型,语法为“String REGEXP '[^0-9.]'”;该运算符是正则表达式的缩写,若数据字符中含有数字时,返回的结果是true,反之返回的结果是false。


Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

MinGW - Minimalist GNU for Windows
This project is in the process of being migrated to osdn.net/projects/mingw, you can continue to follow us there. MinGW: A native Windows port of the GNU Compiler Collection (GCC), freely distributable import libraries and header files for building native Windows applications; includes extensions to the MSVC runtime to support C99 functionality. All MinGW software can run on 64-bit Windows platforms.

DVWA
Damn Vulnerable Web App (DVWA) is a PHP/MySQL web application that is very vulnerable. Its main goals are to be an aid for security professionals to test their skills and tools in a legal environment, to help web developers better understand the process of securing web applications, and to help teachers/students teach/learn in a classroom environment Web application security. The goal of DVWA is to practice some of the most common web vulnerabilities through a simple and straightforward interface, with varying degrees of difficulty. Please note that this software

Atom editor mac version download
The most popular open source editor

VSCode Windows 64-bit Download
A free and powerful IDE editor launched by Microsoft

Dreamweaver CS6
Visual web development tools
