Christopher Juckins

SysAdmin Tips, Tricks and other Software Tools

User Tools

Site Tools


exporting_importing_database_tips

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
exporting_importing_database_tips [2008/08/08 14:56] juckinsexporting_importing_database_tips [2025/12/06 23:10] (current) juckins
Line 1: Line 1:
-Use phpMyAdmin to export databases. \\+==== Database Import-Export Tips ==== 
 + 
 +Users and permissions:\\ 
 +https://www.net7.be/blog/article/mysql_mariadb_grants_dump.html#toc_1_2 \\ 
 + 
 +Import-export:\\ 
 +https://www.digitalocean.com/community/tutorials/how-to-import-and-export-databases-in-mysql-or-mariadb \\ 
 + 
 +Create database, then import sql: 
 + 
 +  create database db_name; 
 +  mysql -u XXX -p'XXX' database_name < archive.sql 
 + 
 +---- 
 + 
 +You can also use phpMyAdmin to export databases. \\
  
 On new machine, make sure database does not exist. \\ On new machine, make sure database does not exist. \\
Line 13: Line 28:
 /usr/libexec/mysqld --basedir=/usr --datadir=/var/lib/mysql --user=mysql --pid-file=/var/run/mysqld/mysqld.pid --skip-external-locking --max_allowed_packet=32M --socket=/var/lib/mysql/mysql.sock /usr/libexec/mysqld --basedir=/usr --datadir=/var/lib/mysql --user=mysql --pid-file=/var/run/mysqld/mysqld.pid --skip-external-locking --max_allowed_packet=32M --socket=/var/lib/mysql/mysql.sock
 </code> </code>
 +
 +SQL statement to show all users on the system: \\
 +<code>
 +mysql> SELECT * from mysql.user;
 +</code>
 +
  
exporting_importing_database_tips.1218221784.txt.gz · Last modified: by juckins