New user who needs to start working with mySQL

Status
Not open for further replies.

engpron

New Member
Messages
8
Reaction score
0
Points
0
Hi,

I'm a new user of this webhosting service and I've never uploaded a site before. I need some help of what shall I need to do after I upload all the files to the public folder please. On the localhost, everything works perfect.

When I uploaded all files the following error was raised:

Warning: mysql_pconnect() [function.mysql-pconnect]: Access denied for user 'elearn_user'@'int.absolut.x10hosting.com' (using password: YES) in /home/engpron/public_html/Connections/elearn_db.php on line 9

Fatal error: Access denied for user 'elearn_user'@'int.absolut.x10hosting.com' (using password: YES) in /home/engpron/public_html/Connections/elearn_db.php on line 9


Do the databases names need to be the same as they were on the localhost or that doesn't make a difference? Please help me step by step for what need to be done after uploading the files especially to configure the databases.

Thanks
 

Anna

I am just me
Staff member
Messages
11,752
Reaction score
581
Points
113
you need to create the database and a user to assign to the database in cPanel.

Also there's maintenance to the mysql servers, which were scheduled to be started late last night (eastern US time), not sure if they are all completed yet.
 

engpron

New Member
Messages
8
Reaction score
0
Points
0
Yes I already created my database and user. However, I think the database name on the servers should match exactly the one on the localhost eh? Because on the localhost, I have the database named elearn, while on the server I named it engpron_elearn

At the moment the databse has no tables because currently I am trying to configure the database first.
 

Gouri

Community Paragon
Community Support
Messages
4,565
Reaction score
245
Points
63
Yes I already created my database and user. However, I think the database name on the servers should match exactly the one on the localhost eh? Because on the localhost, I have the database named elearn, while on the server I named it engpron_elearn

At the moment the databse has no tables because currently I am trying to configure the database first.

Yes that is correct. the database name should come like cpanelusername_databasename and also username too like cpanelusername_databaseusername

Database host is localhost
As anna said the mysql is under maintenance http://x10hosting.com/forums/news-announcements/117437-mysql-update.html

Wait for some time.
 
Last edited:

edu2004eu

New Member
Messages
128
Reaction score
0
Points
0
You need to change your script. It should connect to engpron_elearn. Cause you can't change the DB name to 'elearn' only. The DB name is composed of your CPanel username an underscore and the DB name you created in CPanel.

The idea is: change the mysql_select_db() function and the mysql_connect() function to match the data it shows in the CPanel.
 

Anna

I am just me
Staff member
Messages
11,752
Reaction score
581
Points
113
All databases here are named like cpanelname_databasename. This to separate them on the database server, otherwise there would be an issue if two users wanted a database by the name blog for instance. Same goes for the database usernames.

If you have coded in the database name into your script, you need to change it to the database name you have on the server (engpron_elearn).

The database host needs to be set as 'localhost' in the script you have.
 

engpron

New Member
Messages
8
Reaction score
0
Points
0
Now I have a problem changing the username of the db on the server because my username on the localhost is elearn_user but I am not allowed to put underscore in the name and the max. number of characters is only 7.
 

engpron

New Member
Messages
8
Reaction score
0
Points
0
Ok thanks, I solved it. one last questiion please. Is there a way I can copy the tables from the localhost to the server without building them one by one myself?

Thanks a lot
 

Gouri

Community Paragon
Community Support
Messages
4,565
Reaction score
245
Points
63
Ok thanks, I solved it. one last questiion please. Is there a way I can copy the tables from the localhost to the server without building them one by one myself?

Thanks a lot

BACKUP First
export them to a file in your system and then import the file in your phpmyadmin on your account
 
Status
Not open for further replies.
Top