When using Mysql command line tool to execute SQL scripts, the problem is that the SQL script is executed according to the syntax.
Source create. SQL (full path of the create. SQL file)
What I entered on my computer is
1 source
Tags: img Note Address Enter IMA case successful execution of SQL databaseWhen importing SQL Server database with Navicat, there was an out of memory exception, Baidu has no fruit, think of the command line imported before, again try a successUsage:Open the Execute command:Sqlcmd-s localhost-u sa-p 1-d yanan-i yanan.sq
Due to exporting SQL files
In your original website to use phpMyAdmin to export the database as a SQL file, this step everyone will, do not repeat.
Uploading SQL files
Said earlier, we did not install FTP on the cloud host, how to upload it?
Open the FTP client software, such as FileZilla, use the server IP and root and password, the connection must use the S
I. Common MySQL command-line commands1. Start MySQL service net start MySQLStop MySQL service net stop MySQL2.netstat-na|findstr 3306 View the port being monitored, findstr is used to find out if the following port exists3. Log in to the MySQL console at the command line, using the MySQL commend Lines TOOLSyntax Format
Start SQL Server
Net Start MSSQLServer
Pausing SQL Server
Net Pause MSSQLServer
Restarting a paused SQL Server
Net Continue MSSQLServer
Stop SQL Server
Net Stop MSSQLServer
to modify the password of the SQL Server SA by command
In front of the Navicat tool to import the export database, today to colleagues to import the database, found not to go in, many errors, the feeling of desperation, with the command line imported1. Open the MySQL service. Cmd-->net start MySQL shutdown service: cmd-->net stop MySQL2. Find the bin directory under your MySQL installation package"E:\MySQL\MySQL Server 5.0\bin\"3. Run CD E:\MySQL\MySQL Server 5
After we have installed the SQL Server servers and the server client tools, you can log in to the database using two command-line methods:>sqlwb-s servername or Ip-e #使用当前windows系统的账户登录sqlserver服务器Such as:650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/79/68/wKiom1aQfTaT1dS7AADo5sJ4YSk344.png "style=" float: none; "title=" QQ picture 20160109112137.png
My situation:1. Due to the foreign key, the foreign key (SET foreign_key_checks=0) is closed prematurely when inserting data.2. In the SQL statement used, there are foreign keys bound to other tables, so it is not possible to insert from a PHP page.Cause Analysis:SET foreign_key_checks=0, this directive is valid only for a single database user, that is, the user who uses the statement is valid and can insert data without ignoring the foreign key.Exper
Resolve | command line
uses Uniread to solve the Sql*plus command line history callback function under Linux
Author: fenng
you know that the Sql*plus in the Windows platform command
# Nothing/bin/bash: foo: command not foundshijiangge @ localhost :~ $ Unalias name # destroy nameChapter 7 of TODO
========================================================== =The Lunix adjustment time is to speed up or slow down the server time. generally, do not adjust the time online. to test locally, adjust the server time.Date-s 07/09/2013Date-s 17:05:00========================================================== =How to import an
writing SQL statements, you should keep the keyword size as much as possible. For example, to write reserved keywords in the form of uppercase letters and to write tables or column names in the form of lowercase letters, the SQL statement will also look clear at a glance. In addition, some databases are case sensitive to tables or column names.
Rule 3: free to add blank or
the keyword as uniform as possible. For example, if you write a reserved keyword in uppercase letters, write a table or column name in lowercase letters, the SQL statement will also look a glance. In addition, depending on the database used, some databases are case-sensitive for table or column names.Rule 3: Free to add blanks or line breaksIn the middle of the SQL
write SQL, you want to keep the size of the keyword as uniform as possible. For example, if you write a reserved keyword in uppercase letters, write a table or column name in lowercase letters, the SQL statement will also look a glance. In addition, depending on the database used, some databases are case-sensitive for table or column names. Rule 3: Free to add blanks or
Label:Category: MySQL technology 2013-09-08 20:17 7350 people Read reviews (0) Favorite Report command line mode MySQL import export. sql file method Methods for importing and exporting. sql files from the MySQL import command line
Mysql command line SQL data import code bitsCN.com my personal practice is: phpmyadmin export UTF-8 insert mode abc. SQL
Ftp abc. SQL to server
Ssh to server
Mysql-u abc-p
Use KKK (database name, if not, create database KKK)
Set names 'utf8'
Source abc.
Restore SQL Server database methods from the Bak file on the command lineHttp://blog.sina.com.cn/s/blog_5cdf6f450102dwir.html1. Use RESTORE FILELISTONLY FirstRestore FILELISTONLY from disk = ' E:\BaiduYunDownload\shifenzheng.bak '2. Perform recoveryRestore Database KaifangFrom disk = ' E:\BaiduYunDownload\shifenzheng.bak 'With move ' Linshi ' to ' D:\Program Files\Microsoft
Method 1: Solve the Problem of mysql garbled by adding the parameter-default-character-setutf8 mysql-uroot-ppasswordpath_to_import_file-default-character-setutf8 Method 2: mysql in the command line to import garbled 1. usedatabase_name; 2. setnamesutf8; (or other required encoding)
Method 1: add the parameter-default-character-set = utf8 to solve the mysql garbled problem mysql-u root-p password path_to_imp
1. First open the MySQL tutorial in the command line consolePerhaps the order is as follows:Mysql-u root-p database_nameThen you may be prompted to enter the corresponding password2. The following command may be useful to you when you want to change a database tutorialMysql>use database_nameThen use the following commandMysql>source D:datafilename.sqlOf course yo
My personal practice is: phpMyAdmin exports ABC. SQL in UTF-8 insert mode
Ftp abc. SQL to server
SSH to server
Mysql-u ABC-P use KKK (database name, if not, create database kkk) set names 'utf8' source ABC. SQL
Note: I have seen the set Character Set utf8; statement. It is not feasible. Chinese characters are garbled.
1. First open MySql in the
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.