Rabu, 29 April 2009

Install Mysql di Mandriva 2008.1

Saya menginstal mandriva 2008.1 di komputer tua saya. Mandriva 2008.1 spring ini saya pilih karena dialah satu-satunya distro yang bisa mengenali grafics card di komputer pentium III, RAM 256 yg di beli bekas di Harco. Masalah timbul karena mysql data base ternyata belum terinstal oleh karena itu, disini saya posting kutipan dari hasil search saya di internet.

Before we install any packages, we must enable the main, main_updates, contrib, and contrib_updates repositories. Go to http://easyurpmi.zarb.org/ - it should give you the commands you need to run to enable these repositories. In my case, I ran

urpmi.addmedia contrib ftp://distrib-coffee.ipsl.jussieu.fr/pub/linux/MandrivaLinux/official/2008.1/i586/media/contrib/release with media_info/hdlist.cz

urpmi.addmedia --update contrib_updates ftp://distrib-coffee.ipsl.jussieu.fr/pub/linux/MandrivaLinux/official/2008.1/i586/media/contrib/updates with media_info/hdlist.cz

urpmi.addmedia main ftp://distrib-coffee.ipsl.jussieu.fr/pub/linux/MandrivaLinux/official/2008.1/i586/media/main/release with media_info/hdlist.cz

urpmi.addmedia --update main_updates ftp://distrib-coffee.ipsl.jussieu.fr/pub/linux/MandrivaLinux/official/2008.1/i586/media/main/updates with media_info/hdlist.cz

Django can use multiple database backends, e.g. PostgreSQL, MySQL, SQLite, etc. If you want to use MySQL, you can install it as follows:

urpmi MySQL MySQL-client

By default, networking is not enabled in Mandriva 2008.1's MySQL package. We can change this by commenting out the line skip-networking in /etc/my.cnf:

vi /etc/my.cnf

[...]
# Don't listen on a TCP/IP port at all. This can be a security enhancement,
# if all processes that need to connect to mysqld run on the same host.
# All interaction with mysqld must be made via Unix sockets or named pipes.
# Note that using this option without enabling named pipes on Windows
# (via the "enable-named-pipe" option) will render mysqld useless!
#
#skip-networking


chkconfig mysqld on

... and start it:

/etc/init.d/mysqld start

Now check that networking is enabled. Run

netstat -tap | grep mysql

The output should look like this:

[root@server1 ~]# netstat -tap | grep mysql
tcp 0 0 *:mysql-im *:* LISTEN 3746/mysqlmanager
tcp 0 0 *:mysql *:* LISTEN 3754/mysqld
[root@server1 ~]#


[...]

Run

mysqladmin -u root password yourrootsqlpassword
mysqladmin -h server1.example.com -u root password yourrootsqlpassword

to set a password for the user root (otherwise anybody can access your MySQL database!).

Tidak ada komentar:

Posting Komentar