Theo Lodewijk
Verified User
- Joined
- Feb 5, 2020
- Messages
- 17
After a fresh installation with mysql 8.0 the login details not work.
after opening a support ticket directadmin don't want to help so I hope someone have the solutions!
Installing Directadmin on a last version of Cent OS 8 with Nginx as server.
Reading the post https://help.directadmin.com/item.php?id=45 but also that wil not work.
Result ::
[root@mail custombuild]# systemctl stop mysqld
[root@mail custombuild]# systemctl set-environment MYSQLD_OPTS="--skip-grant-tables"
[root@mail custombuild]# systemctl start mysqld
[root@mail custombuild]#
[root@mail custombuild]# mysql mysql -e "UPDATE mysql.user SET authentication_string=PASSWORD('root_password') WHERE user='root'; FLUSH PRIVILEGES;"
ERROR 1064 (42000) at line 1: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '('root_password') WHERE user='root'' at line 1
[root@mail custombuild]# systemctl unset-environment MYSQLD_OPTS
[root@mail custombuild]# systemctl stop mysqld
[root@mail custombuild]# systemctl start mysqld
[root@mail custombuild]# mysql -uroot -p'root_password' -e "ALTER USER 'root'@'localhost' IDENTIFIED BY 'root_password';"
mysql: [Warning] Using a password on the command line interface can be insecure.
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
[root@mail custombuild]# mysql -uroot -p
Enter password:
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
[root@mail custombuild]# mysql -uroot -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 10
Server version: 8.0.17 MySQL Community Server - GPL
Copyright (c) 2000, 2019, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> GRANT ALL PRIVILEGES ON *.* TO da_admin@localhost IDENTIFIED BY 'da_admin_password' WITH GRANT OPTION;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'IDENTIFIED BY 'Kw0CLFmv7SwqDKG' WITH GRANT OPTION' at line 1
mysql> FLUSH PRIVILEGES;
Query OK, 0 rows affected (0.00 sec)
mysql> quit
Bye
[root@mail custombuild]#
after opening a support ticket directadmin don't want to help so I hope someone have the solutions!
Installing Directadmin on a last version of Cent OS 8 with Nginx as server.
Reading the post https://help.directadmin.com/item.php?id=45 but also that wil not work.
Result ::
[root@mail custombuild]# systemctl stop mysqld
[root@mail custombuild]# systemctl set-environment MYSQLD_OPTS="--skip-grant-tables"
[root@mail custombuild]# systemctl start mysqld
[root@mail custombuild]#
[root@mail custombuild]# mysql mysql -e "UPDATE mysql.user SET authentication_string=PASSWORD('root_password') WHERE user='root'; FLUSH PRIVILEGES;"
ERROR 1064 (42000) at line 1: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '('root_password') WHERE user='root'' at line 1
[root@mail custombuild]# systemctl unset-environment MYSQLD_OPTS
[root@mail custombuild]# systemctl stop mysqld
[root@mail custombuild]# systemctl start mysqld
[root@mail custombuild]# mysql -uroot -p'root_password' -e "ALTER USER 'root'@'localhost' IDENTIFIED BY 'root_password';"
mysql: [Warning] Using a password on the command line interface can be insecure.
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
[root@mail custombuild]# mysql -uroot -p
Enter password:
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
[root@mail custombuild]# mysql -uroot -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 10
Server version: 8.0.17 MySQL Community Server - GPL
Copyright (c) 2000, 2019, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> GRANT ALL PRIVILEGES ON *.* TO da_admin@localhost IDENTIFIED BY 'da_admin_password' WITH GRANT OPTION;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'IDENTIFIED BY 'Kw0CLFmv7SwqDKG' WITH GRANT OPTION' at line 1
mysql> FLUSH PRIVILEGES;
Query OK, 0 rows affected (0.00 sec)
mysql> quit
Bye
[root@mail custombuild]#