database server slackware : mysql

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. :D 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>

Tentang richie

http://richigo.wordpress.com/tentang/
Catatan ini telah ditulis dalam Database, Slackware dan di-tag dengan , . Penunjuk permalink.

3 Respon untuk database server slackware : mysql

  1. rhecizen berkata:

    xixixixi,,,klu diliat2 rumit jg,, =))

    o yo,, tolong ganti link am,,
    yg am bukan tazmania lagi ;)

  2. Ping-balik: koneksi mysql melalui mysql workbench « ::Richie's Weblog::

Tinggalkan Balasan

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Ubah )

Twitter picture

You are commenting using your Twitter account. Log Out / Ubah )

Facebook photo

You are commenting using your Facebook account. Log Out / Ubah )

Connecting to %s