I'm running ISPConfig on CentOS and I don't know how, but I don't seem to have a root mysql user.
I can stop mysqld with
Start it again and skip grant tables
mysqld_safe --skip_grant_tables & mysql> SELECT * FROM sql.user
I see 4 users I had previously created but no root user. I tried putting this in a file /root/rootreset.sql.
GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' IDENTIFIED BY 'my_pass' WITH GRANT OPTION;
And starting with that file
mysqld_safe --init-file=/root/rootreset.sql &  30039 [root@algrhckdj ~]# Starting mysqld daemon with databases from /var/lib/mysql/ STOPPING server from pid file /var/run/mysqld/mysqld.pid 111020 04:06:34 mysqld ended + Done mysqld_safe --init-file=/root/rootreset.sql
It looks like the sql was executed, I don't see an error, but the service doesn't seem to be running, I can't connect to it without this error.
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (111)
I tried running the sql from the console after starting with
--skip-grant-table but got this error.
ERROR 1290 (HY000): The MySQL server is running with the --skip-grant-tables option so it cannot execute this statement
This seems like a lot of info but I've been trying all the different suggestions online and can't get anywhere. What should I be doing?
Help me superuser, you're my only hope.