LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   ERROR 1045 (28000): Access denied for user 'root'@'localhost' (https://www.linuxquestions.org/questions/linux-newbie-8/error-1045-28000-access-denied-for-user-root%40localhost-4175559117/)

windstory 11-17-2015 10:54 AM

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.

Habitual 11-17-2015 11:04 AM

Quote:

Code:

Can't create/write to file '/opt/lampp/var/aria_log_control' (Errcode: 13 "Permission denied")

Check permissions:owner on /opt/lampp/var ?

windstory 11-17-2015 11:15 AM

Habitual/

The "permissions:owner on /opt/lampp/var" is here;

Quote:

[root@localhost ~]# ll /opt/lampp/var
total 12
drwxrwxr-x. 6 mysql mysql 4096 Nov 17 12:11 mysql
drwxr-xr-x. 4 root root 32 Nov 17 12:11 perl
drwxr-xr-x. 2 daemon daemon 26 Nov 17 12:11 proftpd
-rw-r--r--. 1 root root 6440 Oct 14 2012 proftpd.delay
drwxr-xr-x. 2 root root 6 Nov 17 12:11 run

Habitual 11-17-2015 12:35 PM

SELinux enabled on this host?

windstory 11-17-2015 08:40 PM

Habitual/

Thanks, I disabled it.

Habitual 11-17-2015 09:02 PM

Quote:

Originally Posted by windstory (Post 5451226)
Habitual/

Thanks, I disabled it.

Ack. That's not a fix.

https://blogs.oracle.com/jsmyth/entry/selinux_and_mysql

shows something like:
Code:

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.

Hope that Helps.

Compare to https://phe1129.wordpress.com/2012/0...er-on-selinux/

I just gurgled "Mysql selinux" w\out the quotes.


All times are GMT -5. The time now is 10:18 PM.