Installing Moodle in Centos 5 with mySQL

This is my note on how to prepare for installation moodle in centos 5 ..
via command prompt MySQL command.

1. Enter MySQL command prompt with password :

mysql -u root -p

2. Create Blank database.


mysql> create database edu_namran;
Query OK, 1 row affected (0.05 sec)


3. Verify database.

mysql>show databases;

4. create a user

mysql> create user 'someuser' @'localhost' IDENTIFIED BY 'somepass';
Query OK, 0 rows affected (0.06 sec)

5. grant user access to db

mysql> GRANT ALL on edu_namran.* to 'someuser'@'localhost';
Query OK, 0 rows affected (0.04 sec)

6. verify :

[[email protected] html]# mysql -u edunamran -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 147
Server version: 5.0.45 Source distribution
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| edunamran_db |
| test |
+--------------------+
3 rows in set (0.00 sec)


mysql> use edunamran_db;
Database changed
mysql> show tables;
Empty set (0.00 sec)

7. check the required packaged .. before installing


yum install php-mbstring php-xmlrpc

Your machine might already have these package.
And if you're on someone else hosting with cpanel and all..
you might want to get administrator help to get this package added to the machine.

But it was kinda optional, will work without these also.Only a bit optimization advantage if these packages are installed.

8. then.. just proceed with the install.php interface under admin section..

Reference :
1. http://www.debuntu.org/how-to-create-a-mysql-database-and-set-privileges-to-a-user

Related Post

3 Responses

  1. HawkEYE says:

    I got better one after a few minute..
    by adding this two line before line 602 (/usr/share/system-config-network/netconfpkg/gui/maindialog.py)


    if (not isinstance (host.Hostname, str)):
    continue

    now it works like charms again.. hehe.. 😎

    Reply
  2. UncleOp says:

    This was helpful. Summary: if the /etc/hosts file is not well-formed, the python script doesn’t handle it well. In my case, somehow a long entry that was commented out got “line wrapped”, leaving some uncommented garbage on the next line. Fixing the hosts file or adding the above patch “worked”. It seems that some complaint to the user should be generated in such a case, though.

    Reply
    • HawkEYE says:

      @UncleOp , Glad it help.. thanks for dropping by..

      Reply

Leave a Reply

Your email address will not be published. Required fields are marked *