[SOLVED] ERROR 1045 (28000): Access denied for user 'root'@'localhost'
Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
ERROR 1045 (28000): Access denied for user 'root'@'localhost'
I've install xampp-linux-x64-5.6.14-3 on Scientific Linux 7.1 x64.
After installation of xampp, I tried to open mysql, and I got this error. This is the error messages and what I tried.
Quote:
[root@localhost ~]# mysql -u root mysql
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
[root@localhost ~]# lampp stopmysql
XAMPP: Stopping MySQL...ok.
[root@localhost ~]# cd /opt/lampp/bin
[root@localhost bin]# mysqld_safe --skip-grant-tables
2015-11-17 11:39:09 8183 mysqld_safe Logging to '/opt/lampp/var/localhost.localdomain.err'.
2015-11-17 11:39:10 8183 mysqld_safe Starting mysqld daemon with databases from /opt/lampp/var
2015-11-17 11:39:12 8183 mysqld_safe mysqld from pid file /opt/lampp/var/localhost.localdomain.pid ended
[root@localhost bin]# mysql
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/opt/lampp/var/mysql/mysql.sock' (2 "No such file or directory")
And the contents of the '/opt/lampp /var/localhost.localdomain.err' is this.
Quote:
2015-11-17 11:39:10 8183 mysqld_safe Starting mysqld daemon with databases from /opt/lampp/var
2015-11-17 11:39:10 139903951222592 [Note] Using unique option prefix 'key_buffer' is error-prone and can break in the future. Please use the full name 'key_buffer_size' instead.
2015-11-17 11:39:10 139903951222592 [Note] /opt/lampp/sbin/mysqld (mysqld 10.1.8-MariaDB) starting as process 8327 ...
2015-11-17 11:39:10 139903951222592 [ERROR] mysqld: Can't create/write to file '/opt/lampp/var/aria_log_control' (Errcode: 13 "Permission denied")
2015-11-17 11:39:10 139903951222592 [ERROR] mysqld: Got error 'Can't create file' when trying to use aria control file '/opt/lampp/var/aria_log_control'
2015-11-17 11:39:10 139903951222592 [ERROR] Plugin 'Aria' init function returned error.
2015-11-17 11:39:10 139903951222592 [ERROR] Plugin 'Aria' registration as a STORAGE ENGINE failed.
2015-11-17 11:39:10 139903951222592 [Note] InnoDB: Using mutexes to ref count buffer pool pages
2015-11-17 11:39:10 139903951222592 [Note] InnoDB: The InnoDB memory heap is disabled
2015-11-17 11:39:10 139903951222592 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2015-11-17 11:39:10 139903951222592 [Note] InnoDB: Memory barrier is not used
2015-11-17 11:39:10 139903951222592 [Note] InnoDB: Compressed tables use zlib 1.2.8
2015-11-17 11:39:10 139903951222592 [Note] InnoDB: Using CPU crc32 instructions
2015-11-17 11:39:10 139903951222592 [Note] InnoDB: Initializing buffer pool, size = 16.0M
2015-11-17 11:39:10 139903951222592 [Note] InnoDB: Completed initialization of buffer pool
2015-11-17 11:39:10 139903951222592 [Note] InnoDB: Highest supported file format is Barracuda.
2015-11-17 11:39:10 7f3ded50b740 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.
2015-11-17 11:39:10 139903951222592 [ERROR] InnoDB: Could not find a valid tablespace file for 'mysql/innodb_index_stats'. See http://dev.mysql.com/doc/refman/5.6/...-datadict.html for how to resolve the issue.
2015-11-17 11:39:10 139903951222592 [ERROR] InnoDB: Tablespace open failed for '"mysql"."innodb_index_stats"', ignored.
2015-11-17 11:39:10 7f3ded50b740 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.
2015-11-17 11:39:10 139903951222592 [ERROR] InnoDB: Could not find a valid tablespace file for 'mysql/innodb_table_stats'. See http://dev.mysql.com/doc/refman/5.6/...-datadict.html for how to resolve the issue.
2015-11-17 11:39:10 139903951222592 [ERROR] InnoDB: Tablespace open failed for '"mysql"."innodb_table_stats"', ignored.
2015-11-17 11:39:10 7f3ded50b740 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.
2015-11-17 11:39:10 139903951222592 [ERROR] InnoDB: Could not find a valid tablespace file for 'mysql/slave_master_info'. See http://dev.mysql.com/doc/refman/5.6/...-datadict.html for how to resolve the issue.
2015-11-17 11:39:10 139903951222592 [ERROR] InnoDB: Tablespace open failed for '"mysql"."slave_master_info"', ignored.
2015-11-17 11:39:10 7f3ded50b740 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.
2015-11-17 11:39:10 139903951222592 [ERROR] InnoDB: Could not find a valid tablespace file for 'mysql/slave_relay_log_info'. See http://dev.mysql.com/doc/refman/5.6/...-datadict.html for how to resolve the issue.
2015-11-17 11:39:10 139903951222592 [ERROR] InnoDB: Tablespace open failed for '"mysql"."slave_relay_log_info"', ignored.
2015-11-17 11:39:10 7f3ded50b740 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.
2015-11-17 11:39:10 139903951222592 [ERROR] InnoDB: Could not find a valid tablespace file for 'mysql/slave_worker_info'. See http://dev.mysql.com/doc/refman/5.6/...-datadict.html for how to resolve the issue.
2015-11-17 11:39:10 139903951222592 [ERROR] InnoDB: Tablespace open failed for '"mysql"."slave_worker_info"', ignored.
2015-11-17 11:39:10 139903951222592 [Note] InnoDB: 128 rollback segment(s) are active.
2015-11-17 11:39:10 139903951222592 [Note] InnoDB: Waiting for purge to start
2015-11-17 11:39:10 139903951222592 [Note] InnoDB: Percona XtraDB (http://www.percona.com) 5.6.26-74.0 started; log sequence number 1625110
2015-11-17 11:39:10 139903568430848 [Note] InnoDB: Dumping buffer pool(s) not yet started
2015-11-17 11:39:10 139903951222592 [Note] Plugin 'FEEDBACK' is disabled.
2015-11-17 11:39:10 139903951222592 [ERROR] Aria engine is not enabled or did not start. The Aria engine must be enabled to continue as mysqld was configured with --with-aria-tmp-tables
2015-11-17 11:39:10 139903951222592 [ERROR] Aborting
2015-11-17 11:39:12 8183 mysqld_safe mysqld from pid file /opt/lampp/var/localhost.localdomain.pid ended
2015-11-17 11:39:34 8354 mysqld_safe Starting mysqld daemon with databases from /opt/lampp/var
2015-11-17 11:39:35 139917699434304 [Note] Using unique option prefix 'key_buffer' is error-prone and can break in the future. Please use the full name 'key_buffer_size' instead.
2015-11-17 11:39:35 139917699434304 [Note] /opt/lampp/sbin/mysqld (mysqld 10.1.8-MariaDB) starting as process 8496 ...
2015-11-17 11:39:35 139917699434304 [ERROR] mysqld: Can't create/write to file '/opt/lampp/var/aria_log_control' (Errcode: 13 "Permission denied")
2015-11-17 11:39:35 139917699434304 [ERROR] mysqld: Got error 'Can't create file' when trying to use aria control file '/opt/lampp/var/aria_log_control'
2015-11-17 11:39:35 139917699434304 [ERROR] Plugin 'Aria' init function returned error.
2015-11-17 11:39:35 139917699434304 [ERROR] Plugin 'Aria' registration as a STORAGE ENGINE failed.
2015-11-17 11:39:35 139917699434304 [Note] InnoDB: Using mutexes to ref count buffer pool pages
2015-11-17 11:39:35 139917699434304 [Note] InnoDB: The InnoDB memory heap is disabled
2015-11-17 11:39:35 139917699434304 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2015-11-17 11:39:35 139917699434304 [Note] InnoDB: Memory barrier is not used
2015-11-17 11:39:35 139917699434304 [Note] InnoDB: Compressed tables use zlib 1.2.8
2015-11-17 11:39:35 139917699434304 [Note] InnoDB: Using CPU crc32 instructions
2015-11-17 11:39:35 139917699434304 [Note] InnoDB: Initializing buffer pool, size = 16.0M
2015-11-17 11:39:35 139917699434304 [Note] InnoDB: Completed initialization of buffer pool
2015-11-17 11:39:35 139917699434304 [Note] InnoDB: Highest supported file format is Barracuda.
2015-11-17 11:39:35 7f4120c5c740 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.
2015-11-17 11:39:35 139917699434304 [ERROR] InnoDB: Could not find a valid tablespace file for 'mysql/innodb_index_stats'. See http://dev.mysql.com/doc/refman/5.6/...-datadict.html for how to resolve the issue.
2015-11-17 11:39:35 139917699434304 [ERROR] InnoDB: Tablespace open failed for '"mysql"."innodb_index_stats"', ignored.
2015-11-17 11:39:35 7f4120c5c740 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.
2015-11-17 11:39:35 139917699434304 [ERROR] InnoDB: Could not find a valid tablespace file for 'mysql/innodb_table_stats'. See http://dev.mysql.com/doc/refman/5.6/...-datadict.html for how to resolve the issue.
2015-11-17 11:39:35 139917699434304 [ERROR] InnoDB: Tablespace open failed for '"mysql"."innodb_table_stats"', ignored.
2015-11-17 11:39:35 7f4120c5c740 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.
2015-11-17 11:39:35 139917699434304 [ERROR] InnoDB: Could not find a valid tablespace file for 'mysql/slave_master_info'. See http://dev.mysql.com/doc/refman/5.6/...-datadict.html for how to resolve the issue.
2015-11-17 11:39:35 139917699434304 [ERROR] InnoDB: Tablespace open failed for '"mysql"."slave_master_info"', ignored.
2015-11-17 11:39:35 7f4120c5c740 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.
2015-11-17 11:39:35 139917699434304 [ERROR] InnoDB: Could not find a valid tablespace file for 'mysql/slave_relay_log_info'. See http://dev.mysql.com/doc/refman/5.6/...-datadict.html for how to resolve the issue.
2015-11-17 11:39:35 139917699434304 [ERROR] InnoDB: Tablespace open failed for '"mysql"."slave_relay_log_info"', ignored.
2015-11-17 11:39:35 7f4120c5c740 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.
2015-11-17 11:39:35 139917699434304 [ERROR] InnoDB: Could not find a valid tablespace file for 'mysql/slave_worker_info'. See http://dev.mysql.com/doc/refman/5.6/...-datadict.html for how to resolve the issue.
2015-11-17 11:39:35 139917699434304 [ERROR] InnoDB: Tablespace open failed for '"mysql"."slave_worker_info"', ignored.
2015-11-17 11:39:35 139917699434304 [Note] InnoDB: 128 rollback segment(s) are active.
2015-11-17 11:39:35 139917699434304 [Note] InnoDB: Waiting for purge to start
2015-11-17 11:39:35 139917699434304 [Note] InnoDB: Percona XtraDB (http://www.percona.com) 5.6.26-74.0 started; log sequence number 1625120
2015-11-17 11:39:35 139917317355264 [Note] InnoDB: Dumping buffer pool(s) not yet started
2015-11-17 11:39:35 139917699434304 [Note] Plugin 'FEEDBACK' is disabled.
2015-11-17 11:39:35 139917699434304 [ERROR] Aria engine is not enabled or did not start. The Aria engine must be enabled to continue as mysqld was configured with --with-aria-tmp-tables
2015-11-17 11:39:35 139917699434304 [ERROR] Aborting
2015-11-17 11:39:37 8354 mysqld_safe mysqld from pid file /opt/lampp/var/localhost.localdomain.pid ended
Any helpful comments would be highly appreciated.
Thanks in advance.
semanage port -a -t mysqld_port_t -p tcp 3306
semanage fcontext -a -t mysqld_db_t "/opt/lampp/var(/.*)?"
restorecon -Rv /opt/lampp/var
If it's an internal host and not exposed to the internet, disabling I guess is ok.
But it's not something I'd encourage on forward-facing computers exposed to the internet.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.