I have problem with mysql and java. My OS is SALIX-KDE-14.0.1
It seems that mysql is already installed when I install the OS. However it is not complete. So I have created default databases as follows:
Code: Select all
su
mysql_install_db -- user=mysql
Code: Select all
/usr/bin/mysqladmin -u root password "my-password"
Code: Select all
root[xxx]# /usr/bin/mysqld_safe &
[1] 2814
root[xxx]# 140728 00:46:58 mysqld_safe Logging to '/var/lib/mysql/darkstar.err'.
140728 00:46:58 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
140728 00:48:39 mysqld_safe mysqld from pid file /var/lib/mysql/darkstar.pid ended
Code: Select all
xxx[~]$ su
Password:
root[xxx]# mysql -u root -p
Enter password:
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysql/mysql.sock' (2)
Code: Select all
root[xxx]# netstat -plntu
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 127.0.0.1:631 0.0.0.0:* LISTEN 1935/cupsd
tcp6 0 0 ::1:631 :::* LISTEN 1935/cupsd
udp 0 0 0.0.0.0:631 0.0.0.0:* 1935/cupsd
udp 0 0 127.0.0.1:123 0.0.0.0:* 1920/ntpd
.......
.......
I just read the wiki and then set up the .cnf file as follows:
Code: Select all
su
cp /etc/mysql/my-medium.cnf /etc/mysql/my.cnf