mysql hot mess

Post your questions about Web Server usage and Apache + PHP + MySQL/SQLite web applications.
Post Reply
airone12
Starting out
Posts: 31
Joined: Sat Apr 13, 2013 5:20 am

mysql hot mess

Post by airone12 »

Hi there,
first of all, let me tell that I am an amateur, so probably the situation I am facing is my own fault.
I have Mysql on my QNAP NAS (TS-251+ with firmware 4.5.3.1670), it's not the most important db in the world but i use it mainly for Kodi so that when i change device I can see what i have already seen and start from the point I was.
Kodi connect using a "xbmc" user.
Couple of months ago Kodi was upgraded from version 18 to 19. First things Kodi tries to migrate the db but it fails, and looking around it looks like it's something related to mysql version that needs upgrade launching mysql_upgrade command.
I try it, and it replies this
Version check failed. Got the following error when calling the 'mysql' command line client
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
FATAL ERROR: Upgrade failed
I usually connect using PHPMyadmin, using the same "xbmc" user that Kodi uses. At this point I try with root user and it does not work.
I started following guides online and this is the situation of my mysql.user table
Host User Password Select_priv Insert_priv Update_priv Delete_priv Create_priv Drop_priv Reload_priv Shutdown_priv Process_priv File_priv Grant_priv References_priv Index_priv Alter_priv Show_db_priv Super_priv Create_tmp_table_priv Lock_tables_priv Execute_priv Repl_slave_priv Repl_client_priv Create_view_priv Show_view_priv Create_routine_priv Alter_routine_priv Create_user_priv Event_priv Trigger_priv Create_tablespace_priv ssl_type ssl_cipher x509_issuer x509_subject max_questions max_updates max_connections max_user_connections plugin authentication_string
% admin Y Y Y Y Y Y Y Y Y Y N Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y 0 0 0 0
% xbmc *EC4F5173DE994BFEAB7040A4A32B4ED6DE26F6F0 Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y 0 0 0 0
% ed2ktools Y Y Y Y N N N N N N N N N N N N N N N N N N N N N N N N N 0 0 0 0 mysql_native_password *7717402E66D079603B5200980BC40A023379CD4B
localhost modx N N N N N N N N N N N N N N N N N N N N N N N N N N N N N 0 0 0 0 mysql_native_password *D53EBCBC45EBCF7F272815C7F9DA4AE41BC3B096
localhost root Y Y Y Y Y Y Y Y Y Y N Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y 0 0 0 0
localhost admin Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y 0 0 0 0
before someone gets a stroke... xbmc password is xbmc, i care very little of security of this mysql installation.
To confuse me more, I got
# ps aux | grep mysql
8791 admin 2776 S /bin/sh /usr/local/mariadb/bin/mysqld_safe --defaults-file=/usr/local/mariadb/my-mariadb.cnf --basedir=/usr/local/mariadb --datadir=/share/MD1_DATA/.system/data --user=admin --default-storage-engine=MyISAM --wait_timeout=2628000 --pid-file=/var/lock/mariadb.pid --tmpdir=/share/MD1_DATA/.system/tmp
9198 admin 58064 S /usr/local/mariadb/bin/mysqld --defaults-file=/usr/local/mariadb/my-mariadb.cnf --basedir=/usr/local/mariadb --datadir=/share/MD1_DATA/.system/data --plugin-dir=/usr/local/mariadb/lib/plugin --user=admin --default-storage-engine=MyISAM --wait-timeout=2628000 --tmpdir=/share/MD1_DATA/.system/tmp --log-error=/share/MD1_DATA/.system/data/TORXNAS.err --pid-file=/var/lock/mariadb.pid --socket=/tmp/mysql_mediadb.sock --port=3310
18208 admin 2772 S /bin/sh /usr/local/mysql/bin/mysqld_safe --defaults-file=/etc/config/my.cnf --datadir=/usr/local/mysql/var --tmpdir=/usr/local/mysql/tmp --pid-file=/var/lock/qmysql.pid --user=admin
18586 admin 79716 S /usr/local/mysql/bin/mysqld --defaults-file=/etc/config/my.cnf --basedir=/usr/local/mysql --datadir=/usr/local/mysql/var --plugin-dir=/usr/local/mysql/lib/plugin --user=admin --tmpdir=/usr/local/mysql/tmp --log-error=/usr/local/mysql/var/TORXNAS.err --pid-file=/var/lock/qmysql.pid --socket=/tmp/mysql.sock --port=3306
25923 admin 1012 S grep mysql
26430 admin 3568 S /bin/sh /usr/local/mariadb/bin/mysqld_safe --defaults-file=/etc/qbox-mariadb.cnf --basedir=/usr/local/mariadb --datadir=/share/MD1_DATA/.qbox/mysql/data --user=admin --default-storage-engine=MyISAM --wait_timeout=2628000 --pid-file=/var/lock/mysql_qbox.pid --tmpdir=/share/MD1_DATA/.qbox/mysql/tmp
26794 admin 60516 S /usr/local/mariadb/bin/mysqld --defaults-file=/etc/qbox-mariadb.cnf --basedir=/usr/local/mariadb --datadir=/share/MD1_DATA/.qbox/mysql/data --plugin-dir=/usr/local/mariadb/lib/plugin --user=admin --default-storage-engine=MyISAM --wait-timeout=2628000 --tmpdir=/share/MD1_DATA/.qbox/mysql/tmp --log-error=/share/MD1_DATA/.qbox/mysql/data/TORXNAS.err --pid-file=/var/lock/mysql_qbox.pid --socket=/tmp/qsyncsrv/mysql_qbox.sock --port=23310
what the hell if all this stuff.
And to confuse me more more I have /usr/local/mariadb/bin/ but also a /usr/local/mysql/bin/

Please, can a good person help me fix this hot mess so that I can use the mysql command and log in properly from command line and I can also launch this mysql_upgrade?
Thanks a lot
Post Reply

Return to “Web Server & Applications (Apache + PHP + MySQL / SQLite)”