大家好,是这么回事:
就是我白天在公司上班,其实大多数时候都很清闲,我就利用这些时间自学坐在那里学MySQL,PHP...
学php 和 js html 的时候还好说,我把文件传到 快盘,回到家同步一下,再复制出来,就可以继续自学;
可是我学MySQL的时候,我把白天在公司做好的表,库 上传到快盘,拿回家放到 *mysqldata 文件夹下的时候,居然都不能用!
提示:Table * doesn't exist
我百度查了是因为数据库不存在这个表,我就想问问,要是复制数据库文件,换个电脑继续用的时候,都怎么操作?
我用的windows 系统,谢谢大家解答.
告诉我个命令,我自己去百度搜就行,比如你告诉我 CREATE TABLE ,DROP TABLE
天蓬老师2017-04-17 14:44:11
You can download a MySQL Workbench, which is very convenient for import and export, graphical operation, simple setup, and comes with built-in modeling
大家讲道理2017-04-17 14:44:11
Hello mysql, you can use mysql workbench or navigate to export the database file and then import it
You can put the code on coding.net or github so that it can be synchronized
PHPz2017-04-17 14:44:11
The easiest way is to use the import and export that comes with mysql. Many database clients also support import and export, such as phpmyadmin and Navicat for MySQL.
In addition, do not use fast disk synchronization. Kuaipan has stopped serving.
黄舟2017-04-17 14:44:11
I will sponsor a mysql database if the author does not mind.
To put it simply, you can connect to the Internet as long as you are at home or at work, and the data will be the same.
PHPz2017-04-17 14:44:11
First export to a backup file, and then import the backup file into the database
黄舟2017-04-17 14:44:11
You can try it, use navicat to connect to the database, then right-click on the table name, you will see the "Copy" option, and it will be copied automatically. Of course, you can also open other databases in navicat, and then right-click and paste. Okay, this is the most convenient operation so far.
If another database is not opened in Navicat, then you can only export the sql format file, and then import the sql file into another database. However, I remember that in Navicat, there is a transfer for right-clicking the database connection, which seems to be possible. Automatically transfer data between databases. If you haven’t tried it, you can try it.
PHP中文网2017-04-17 14:44:11
SQL command:
SOURCE *.sql;
SELECT * FROM table INTO OUTFILE 'path file name'
FIELDS TERMINATED BY ','
ENCLOSED BY '"'
LINES TERMINATED BY 'rn';
LOAD DATA LOCAL INFILE 'path file name' INTO TABLE table
FIELDS TERMINATED BY ','
LINES TERMINATED BY 'rn';
cmd command:
mysql -u root -p library < *.sql
mysqldump -u root -p library > *.sql
阿神2017-04-17 14:44:11
If you are familiar with the MySQL command line, you can use mysqldump to export the database;
If you are not familiar with the command line, you can find a GUI client tool, such as Navicate, MySQL-Workbench, etc. These tools can import and export the database, and the operation is relatively simple. The command line is simpler...