Why do i have debian-sys-maint instead of a mysql root user?
I am currently trying to get mysql setup and i was trying to recover the password because i didnt know my root password and i got these directions
sudo /etc/init.d/mysql stop
sudo mysqld --skip-grant-tables &
mysql -u root mysql
mysql>UPDATE user SET Password=PASSWORD('PASSWORD') WHERE User='root'; FLUSH PRIVILEGES; exit;
sudo开发者_高级运维 killall mysqld
sudo /etc/init.d/mysql start
the problem is whwn i log into the mysql i notice that when i do
mysql> select * from user;
i only have 1 user that is debian-sys-maint, So how do i not have a root user and how do i create one with a password
MySQL is using pluggable authentication. It means that there could be users allowed to connect even if they are not in users
table. So if you have default installation of MySQL in Ubuntu, just connect as root with root's password. MySQL will use Linux's authentication to check for password. Neverthel "resetting permissions". And concerning the debian-sys-maint
user, read this answer on serverfault.
精彩评论