This is a read-only copy of the MariaDB Knowledgebase generated on 2024-11-15. For the latest, interactive version please visit https://mariadb.com/kb/.

server do not permit root to log in

Hi

I am trying to start the db with mysqld command the server is getting ready for connections but i cant log in with root because access is denied. I tried to start the server with the skip-grant-access options, and i saw that root does not exist in mysql.USER table.

I have many error message when the server starts :

2016-04-27 01:24:11 b7074740  InnoDB: Operating system error number 2 in a file operation.
InnoDB: The error means the system cannot find the path specified.
InnoDB: If you are installing InnoDB, remember that you must create
InnoDB: directories yourself, InnoDB does not create them.
160427  1:24:11 [ERROR] InnoDB: Could not find a valid tablespace file for 'mysql/gtid_slave_pos'. See http://dev.mysql.com/doc/refman/5.6/en/innodb-troubleshooting-datadict.html for how to resolve the issue.
160427  1:24:11 [ERROR] InnoDB: Tablespace open failed for '"mysql"."gtid_slave_pos"', ignored.
2016-04-27 01:24:11 b7074740  InnoDB: Operating system error number 2 in a file operation.
InnoDB: The error means the system cannot find the path specified.
InnoDB: If you are installing InnoDB, remember that you must create
InnoDB: directories yourself, InnoDB does not create them.
160427  1:24:11 [ERROR] InnoDB: Could not find a valid tablespace file for 'mysql/innodb_index_stats'. See http://dev.mysql.com/doc/refman/5.6/en/innodb-troubleshooting-datadict.html for how to resolve the issue.
160427  1:24:11 [ERROR] InnoDB: Tablespace open failed for '"mysql"."innodb_index_stats"', ignored.
160427  1:24:11 [Note] InnoDB: 128 rollback segment(s) are active.
160427  1:24:11 [Note] InnoDB: Waiting for purge to start
160427  1:24:12 [Note] InnoDB:  Percona XtraDB (http://www.percona.com) 5.6.28-76.1 started; log sequence number 1729734
handlersocket: initialized
160427  1:24:12 server_audit: MariaDB Audit Plugin version 1.4.0 STARTED.
160427  1:24:12 [ERROR] Missing system table mysql.proxies_priv; please run mysql_upgrade to create it
160427  1:24:12 [Warning] Failed to load slave replication state from table mysql.gtid_slave_pos: 1146: Table 'mysql.gtid_slave_pos' doesn't exist

Does anybody no what to do with this informations? Regards Xavier

Answer

If there is no root user in the mysql.user table, you can create it yourself.

These errors in the log are about missing or corrupted system tables in the mysql database. Did you run mysql_install_db script at all? If you did, perhaps your mysql database is incomplete or corrupted. Try to rename it and run mysql_install_db script again.

Content reproduced on this site is the property of its respective owners, and this content is not reviewed in advance by MariaDB. The views, information and opinions expressed by this content do not necessarily represent those of MariaDB or any other party.