Host mysql
#1

Hello, I have a host, but as my script was like this:

PHP код:
#define MYSQL_HOST "localhost"
#define MYSQL_USER "root"
#define MYSQL_DATABASE "mydb"
#define MYSQL_PASSWORD "" 
It couldn't connect to it, so I did some research and I saw that I had to change the MYSQL_HOST "localhost" to MYSQL_HOST "myserverip". Well I did that, and it was good. but the next problem is the MYSQL_USER "root"...
I assume the "root" should be replaced with something else to get it working.

Any help is appreciated.
Reply
#2

All of the details that you need in order to connect to your MySQL server should be provided by your host. If they haven't, you can probably send a ticket requesting for your MySQL username and password though it's usually found on the details of your account. If you're using a VPS or dedicated server, you would have to create your own through the control panel or again, have it requested.
Reply
#3

I see, thank you for the info as I haven't paid attention to that.
I changed everything based on the host yet I can't connect to it.
The Mysql_log.txt says:
Reply
#4

Quote:
Originally Posted by saffierr
Посмотреть сообщение
I see, thank you for the info as I haven't paid attention to that.
I changed everything based on the host yet I can't connect to it.
The Mysql_log.txt says:
Based on my experience and from the errors that you've posted, there's something wrong with the password. If the password you're using right now is the default one, ask your host to reset it to something you want. And make sure that you don't interchange the username and database name.
Reply
#5

Which password do you mean??
I can't even register on my server
Reply
#6

Quote:
Originally Posted by saffierr
Посмотреть сообщение
Which password do you mean??
I can't even register on my server
Your mysql password. If you're using the same password from the time you got your hosting, have it changed to what you want and see if it works. But if you were able to have access to your phpmyadmin using the same username and password then there shouldn't be a problem. Make sure that your host requires "localhost" and not something like "mysql.hosting.com" - which is normally the case.
Reply
#7

Thanks for the idea, it has been fixed.
Reply
#8

Quote:
Originally Posted by saffierr
Посмотреть сообщение
Thanks for the idea, it has been fixed.
No problem. Could you at least tell me what the problem was? Thanks.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)