User Tools

Site Tools


programming:mysql:mysql

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
programming:mysql:mysql [2019/05/24 09:48] – [Export database] maferreiraprogramming:mysql:mysql [2019/05/24 09:50] – [Create user] maferreira
Line 6: Line 6:
 ===== Export database ===== ===== Export database =====
 <code mysql>mysqldump -u YourUser -p YourDatabaseName > wantedsqlfile.sql</code> <code mysql>mysqldump -u YourUser -p YourDatabaseName > wantedsqlfile.sql</code>
- 
 ===== Import database ===== ===== Import database =====
-  mysql -u username -p database_name < file.sql+<code mysql>mysql -u username -p database_name < file.sql</code>
 <note important>Make sure you have created an empty database named <data_basename></note> <note important>Make sure you have created an empty database named <data_basename></note>
  
Line 15: Line 14:
  
 ===== Create user ===== ===== Create user =====
-  CREATE USER '<username>'@'localhost' IDENTIFIED BY '<password>';+<code mysql>CREATE USER '<username>'@'localhost' IDENTIFIED BY '<password>';</code>
  
   mysql> grant usage on *.* to myUsername@localhost identified by 'myPassword';   mysql> grant usage on *.* to myUsername@localhost identified by 'myPassword';
programming/mysql/mysql.txt · Last modified: 2019/10/11 09:34 by maferreira