Wednesday, June 18, 2014

Debian - MySQL - Why i cannot install?

GRRRRRRRRRrrrrrrrrr

Fired up a debian template.
Could not install a stupid mysql.
2014 already... WHY LIKE THAT?

apt-get install mysql-server
XXXXXXX

mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended
mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
[Note] Plugin 'FEDERATED' is disabled.
/usr/libexec/mysqld: Can't find file: './mysql/plugin.frm' (errno: 13)
[ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it.
InnoDB: The InnoDB memory heap is disabled
InnoDB: Mutexes and rw_locks use GCC atomic builtins
InnoDB: Compressed tables use zlib 1.2.3
InnoDB: Using Linux native AIO
InnoDB: Initializing buffer pool, size = 128.0M
InnoDB: Completed initialization of buffer pool
InnoDB: Operating system error number 13 in a file operation.
InnoDB: The error means mysqld does not have the access rights to
InnoDB: the directory.
InnoDB: File name ./ibdata1
InnoDB: File operation call: 'open'.
InnoDB: Cannot continue operation.
mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended

How u fix?
nano /etc/mysql/my.cnf
Add this -> innodb_use_native_aio=0 * This should be under the [mysqld] tag

Change your root password ( which is empty because some how something screw up...)
mysqladmin -u root password NEWPASSWORD

Then suei suei if you get an error as such:
'Access denied for user 'debian-sys-maint'@'localhost' (using password: YES)'

cat /etc/mysql/debian.cnf
Note the password in the client section.
[client]
host     = localhost
user     = debian-sys-maint
password = SOMERANDOMPASSWORDHERE
socket   = /var/run/mysqld/mysqld.sock

mysql -u root -p
GRANT ALL PRIVILEGES ON *.* TO 'debian-sys-maint'@'localhost' IDENTIFIED BY 'SOMERANDOMPASSWORDHERE';

/etc/init.d/mysql restart
*pray

No comments: