permasalahan :
$ mysql
ERROR 2002 (HY000): Can’t connect to local MySQL server through socket ‘/var/run/mysql/mysql.sock’ (2)
ternyata, saya perlu melakukan ini :
# mysql_install_db
# chown mysql.mysql /var/lib/mysql/ -R
# chmod -R 755 /var/lib/mysql/
chown digunakan untuk mengubah hak akses kepemilikan, berarti sebelumnya direktory /var/lib/mysql ini adalah milik root semata. kini berganti menjadi milik user dan grup mysql. telah saya baca, sintaksnya seperti ini :
# chown userownerbaru:grupownerbaru file_atau_direktori
jelaskan..
oke, sekarang saya bisa membuat dan menjalankan database mysql,
# chmod +x /etc/rc.d/rc.mysqld
# /etc/rc.d/rc.mysqld start
lalu mencobanya,
$ mysql
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 2
Server version: 5.1.46 Source distribution
Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
This software comes with ABSOLUTELY NO WARRANTY. This is free software,
and you are welcome to modify and redistribute it under the GPL v2 license
Type ‘help;’ or ‘\h’ for help. Type ‘\c’ to clear the current input statement.
mysql>
sip, berarti telah berhasil.
sekarang kalau mau menjalankan mysql secara otomatis, saya tinggal menambahkan opsi +x pada /etc/rc.d/rc.mysqld.
karena secara default, mysql ini tidak dipassword. akan lebih baik jika diberikan saja, ![]()
# mysqladmin -u root password passwordku
lalu dapat mulai diakses kembali,
$ mysql -u root -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 9
Server version: 5.1.46 Source distribution
Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
This software comes with ABSOLUTELY NO WARRANTY. This is free software,
and you are welcome to modify and redistribute it under the GPL v2 license
Type ‘help;’ or ‘\h’ for help. Type ‘\c’ to clear the current input statement.
mysql>
xixixixi,,,klu diliat2 rumit jg,, =))
o yo,, tolong ganti link am,,
yg am bukan tazmania lagi
ikuti aja br0.. ntar ketemu juga.. hehe,
oh, oke..
Ping-balik: koneksi mysql melalui mysql workbench « ::Richie's Weblog::