PDA

View Full Version : Database and Msql Database?


ryukenden
01-06-2007, 02:16 PM
I am trying to install a script and the file says that to change config data

dbhost=your_DB_host
dbname=your_DB_name
dbuser=your_DB_user
dbpass=your_DB_user_password

And then it says

Create the mysql database (usually tinylink) with mysqladmin.
mysqladmin -u<your_mysql_user> -p<your_mysql_pass> create the link

[6] Create the mysql tables. You have 2 options :
1) mysql -u<your_mysql_user> -p<your_mysql_pass> your link < db_structure.sql
2) use phpMyAdmin to run the SQL file 'sql/db_structure.sql'

I thought dbname is same as mysql database name. I could not find mysqladmin at Hostmonster. I could only find phpMyadmin.

I am currently stuck with this installation and any suggestions are appreciated.

McCoy
01-06-2007, 05:48 PM
mysqladmin must be used from the server's terminal (via SSH), but you don't really need it, you can perform all needed operations with phpMyAdmin.

In any case, you can't use mysqladmin to create databases, you must use CPanel for that. You can't neither use phpMyAdmin for creating database, only CPanel.

Once you create the database, your database name would be:

cpanelusername_databasename

For example, if your Cpanel username is "john" and the database you created is named "foo", your username will be:

john_foo

Then you must create a user and assign it to the database, usually with full privileges. You must do that with CPanel also. Again, the user will follow the pattern

cpanleusername_username

So if the new mysql user you created is named "doe" the username will be

john_doe

the password can be anything you set up, there's no scheme on that.

So all the data you need is

dbhost = localhost
dbname = cpanelusername_databasename
dbuser = cpanelusername_username
dbpas = password


Oh, and you can import the .sql file with phpMyAdmin.

ryukenden
01-15-2007, 04:49 PM
Thank you very much for your advice.