Clickers's blog
Setup and configure MYSQL database server on Fedora Core.
The step by step procedure below is show the setup procedure and the configuration of MYSQL database server (MSQLd) on Fedora Core 6 operating system.
[root@tenouk ~]# mysqladmin -u dba_user -p create databasename
Enter password:
mysqladmin: connect to server at 'localhost' failed
error: 'Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)'
Check that mysqld is running and that the socket: '/var/lib/mysql/mysql.sock' exists!
1. If the error message above appear, this could mean that you MYSQL sever is not in service, you need to start the mysqd server on your fedora core server. Try the service command to start mysqld as in example below:.
[root@tenouk ~]# service mysqld start
Initializing MySQL database: Neither host 'tenouk.jmti.gov.my' nor 'localhost' could be looked up with
/usr/bin/resolveip
Please configure the 'hostname' command to return a correct hostname.
If you want to solve this at a later stage, restart this script with
the --force option
[FAILED]
2. If the error above appear, these mean that the hosts file is not configure properly. If the same error happen, use the step below to configure your server hosts file: If NOT proceed to step 3.
Change root password for mysqld on Fedora Core.
The article below show step by step procedure how to change the current root password for MYSQLd (MYSQL server). This procedure can be done only when you know the current root password for MSQLd server; The step by step command below execute and tested on Fedora Core 6 using Ver 14.12 Distrib 5.0.27.
[root@tenouk ~]# mysql --user=root --pass mysql
Enter password: [Enter your MYSQL root password here, then hit enter key]
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 1 to server version: 5.0.27
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
[Use and executet MYSQL command below and put your new password for MYSQL root user]
mysql> update user set Password=PASSWORD('your-new-mysql-password') WHERE User='root';
Query OK, 2 rows affected (0.01 sec)
Rows matched: 2 Changed: 2 Warnings: 0
[To apply changes make sure you execute the command below]
mysql> flush privileges;
Query OK, 0 rows affected (0.00 sec)












