MySQL is an open source relational database management system. MariaDB is a fork of MySQL. In MySQL / MariaDB you can create a user and he will be authenticated by password. But sometimes we all make mistakes… Error: mysql> GRANT USAGE ON *.* TO ‘user’@’localhost’ IDENTIFIED BY PASSWORD ‘s3cr3t’;ERROR 1372 (HY000): Password hash should beContinue Reading
Tag: DataBase
How to backup all databases in MySQL / MariaDB
MySQL is an open source relational database management system. MariaDB is a fork of MySQL. Backup all databases to a local file: mysqldump –all-database -uroot -p > backup.sql Since the dump files are just SQL commands, you can restore the database backup to a file. And execute them by telling mysql to run the commandsContinue Reading
How to create a copy of table in MySQL / MariaDB
MYSQL is a popular database server for production and development. MariaDB is a fork of MySQL to keep it independent from Oracle (new owner of MySQL). So they are almost the same If we don’t talk about internal implementations and optimizations. Create a table with the same scheme: CREATE TABLE {{ new table }} LIKEContinue Reading
Can’t connect to local MySQL server through socket ‘/var/run/mysqld/mysqld.sock’
When working with MySQL / MariaDB database you can catch a strange error: ERROR 2002 (HY000): Can’t connect to local MySQL server through socket ‘/var/run/mysqld/mysqld.sock’ (2) The same error in log files: [ERROR] Can’t start server : Bind on unix socket: No such file or directory [ERROR] Do you already have another mysqld server runningContinue Reading