Friday, January 14, 2022

MySQL tips and tricks

Restore the DB

If you have sql.gz archive

1 - create target database on server
2 - zcat mydb.sql.gz | mysql -u root -h localhost -p mydb


Find the data location
1 connect to mysql;
2 select @@datadir