A Screencast version of this tutorial is available here.
Note:
This guide is written for Gandi AI users that have installed a MySQL database. If you have not installed a MySQL database, please do so using the Gandi AI interface before continuing.Popular database-driven PHP websites (ex. phpBB, Plogger, Gallery2, etc…) need access to a database in order to work.
During the installation process, you are asked at one point for at least four things:
You need to configure your database before starting the installation process, so that you can fill in this information. Here is how this is done.
Note:
Macintosh and Linux users, you can simply use your console for typing these commands. Windows users, you will need to download, install, and use a third-party application such as PuTTY to do this.You need to create a database. To do this,
With Mac or Linux, you can directly enter
ssh admin@000.000.000.000
in your SSH client's window, replacing the numbers by your server's IP (where can I find this?).
In PuTTY, you'll need to enter your server's IP address in the "Host Name" field, and then click "Open". A shell window will open with a "login as" field to fill in. You should login as admin; and then give the password associated to your server's admin account ( no characters will be displayed when you type the password).
Note:
Gandi support don't hve access to this password. If you have forgotten it, you'll need to create a new server.Now, log into your mysql database as root by typing:
mysql -p
Then, it will ask you for your password. This is the password that you entered for your database when you installed your MySQL database on your server. If you have forgotten this password, you can reset it via your Gandi AI interface, by clicking on the 'configure' link on your database line.
It is time to actually create the database you will be using for your website. To do this, first choose a good name (we'll use the name gallery as an example), and type:
create database gallery;
…and press enter. You will then see the following appear:
Query OK, 1 row affected (0.16 sec)
This is good, and confirms that the database has been added.
Now, create a username and a password for your new database. The password should be very secure.
Let's say that the username will be 'ryan' and the password will be 'GanD1do'. You will then type the following:
grant all privileges on gallery.* to 'ryan'@'localhost' identified by "GanD1do";
Where you replace:
Then, type:
flush privileges;
and finally:
exit;
You may now exit your server by typing:
exit
Congrats! You have now created a database on your server with a username and password!
Simply return to your installation process and enter the information that you now have. For example, we can now provide the following:
Note:
DO NOT USE the above example literally for creating your database! For security reasons, please choose a unique username and a good password. You are responsible for the security of your server.
No question on this page and its children.
RSS feed for questions matching this filter (Help)Last modified: 06 Feb 2008 at 14:09 by Elliott F. (Gandi)