MySQL commands: Difference between revisions

Jump to navigation Jump to search
1 byte removed ,  26 January 2017
no edit summary
No edit summary
Line 49: Line 49:
[http://stackoverflow.com/questions/17397661/append-mysql-dump-to-a-table mysqldump - Append MYSQL dump to a table - Stack Overflow] {{access | date = 2016-06-29}}
[http://stackoverflow.com/questions/17397661/append-mysql-dump-to-a-table mysqldump - Append MYSQL dump to a table - Stack Overflow] {{access | date = 2016-06-29}}


==== Synchronizing databases ====
* [http://www.heidisql.com/ HeidiSQL - MySQL, MSSQL and PostgreSQL made easy] v.9.4.0.5125 for {{Win}}: Manually synchronizing databases between two different servers. {{exclaim}} No schedules.
** Steps: Choose the database or table --> Export database as SQL --> Output: Select the mysql server connection
* [https://dev.mysql.com/doc/refman/5.7/en/replication.html Replication]


=== Importing data from MySql sql file ===
=== Importing data from MySql sql file ===
Line 77: Line 73:
# {{kbd | key = <nowiki>7za x -so data.zip | mysql -u username -p -h localhost --default_character_set utf8 --force DATA_BASE_NAME</nowiki>}} <ref>[http://stackoverflow.com/questions/11267309/importing-zipped-files-in-mysql-using-command-line database - Importing zipped files in Mysql using command line - Stack Overflow]</ref><ref>[http://needs-be.blogspot.tw/2011/01/install-7zip-on-centos-55.html Install 7Zip on CentOS 5.5]</ref> and press {{kbd | key =  <nowiki>Enter</nowiki> }}
# {{kbd | key = <nowiki>7za x -so data.zip | mysql -u username -p -h localhost --default_character_set utf8 --force DATA_BASE_NAME</nowiki>}} <ref>[http://stackoverflow.com/questions/11267309/importing-zipped-files-in-mysql-using-command-line database - Importing zipped files in Mysql using command line - Stack Overflow]</ref><ref>[http://needs-be.blogspot.tw/2011/01/install-7zip-on-centos-55.html Install 7Zip on CentOS 5.5]</ref> and press {{kbd | key =  <nowiki>Enter</nowiki> }}
# enter {{kbd | key =  <nowiki>password</nowiki> }} and press {{kbd | key =  <nowiki>Enter</nowiki> }}
# enter {{kbd | key =  <nowiki>password</nowiki> }} and press {{kbd | key =  <nowiki>Enter</nowiki> }}
=== Synchronizing databases ===
* [http://www.heidisql.com/ HeidiSQL - MySQL, MSSQL and PostgreSQL made easy] v.9.4.0.5125 for {{Win}}: Manually synchronizing databases between two different servers. {{exclaim}} No schedules.
** Steps: Choose the database or table --> Export database as SQL --> Output: Select the mysql server connection
* [https://dev.mysql.com/doc/refman/5.7/en/replication.html Replication]


=== Show the MySQL process list & kill the process ===
=== Show the MySQL process list & kill the process ===

Navigation menu