diff --git a/MySQL-tips.md b/MySQL-tips.md index c0dd5a0..88deb19 100644 --- a/MySQL-tips.md +++ b/MySQL-tips.md @@ -1,3 +1,5 @@ +This tips were prepared for [[Install Tracks-2.5 on Ubuntu 20.10]] +

MySQL 8.0 Reference Manual

https://dev.mysql.com/doc/refman/8.0/en/ @@ -64,4 +66,31 @@

  • $MYSQL_HOME/my.cnf
  • [datadir]/my.cnf
  • ~/.my.cnf
  • - \ No newline at end of file + +

    Import Export the content of the database

    +
    +

    >mysqldump -u user_name -p db_name > /tmp/partkeepr.sql

    +
    +

    set user_name and db_name accordingly.

    +

    e.g.

    +
    +

    >mysqldump -u daniel -p tempe > ~/tracks.sql

    +
    +

    The command will ask for the password of the SQL user.

    +

    If you get the error

    +

    mysqldump: Error: 'Access denied; you need (at least one of) the PROCESS privilege(s) for this operation' when trying to dump tablespaces

    +

    if your user root doesn't have a password ... you can use root (note that the line is without -p)

    +
    +

    >mysqldump -u root tempe > ~/tracks.sql

    +
    +

    Import the SQL file

    +
    +

    Sometimes it is required to drop all the table before the import, you need to check for your case.

    +

    at the command line do

    +
    +

    >mysql -u user_name -p db_name < /tmp/partkeepr.sql

    +
    +

    e.g.

    +
    +

    >mysql -u daniel -p tempe < ~/tracks.sql

    +