博文

目前显示的是标签为“mysql”的博文

ubuntu18.04 mysql5.7/mariadb10.1 set root password

1. Login (use sudo to login without password) sudo mysql -u root 2. Check SELECT User,Host FROM mysql.user; 3. Delete out root user DROP USER 'root'@'localhost'; 4. Create new root user CREATE USER 'root'@'%' IDENTIFIED BY 'your_password'; 5. Grant permissions GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' WITH GRANT OPTION; 6. FLUSH PRIVILEGES;

Why cannot mysqld be found?

In some LAMP server, you may be confused that mysqld service cannot be found. For example, when using the command: > sudo service msyqld restart It just failed and said something like mysqld.service didn't exist. When this happens, please try: >sudo service  mariadb restart Hope this will help.