fordste
asked on
mysql ERROR 1045
I am sure there is a simple fix for this but I can't find it. I can make a connection to mysql using mysql -u root -p without a problem and I can use mysql -h local -u root without a problem, however, when I try mysql -h 127.0.0.1 -u root -p or try mysql -h web01 -u root -p I get a 1045 error. When I try and make a connection from a webpage I get the MysqlConnection Failed. Access denied for user.... This thing was working until I decided I needed to learn how to install it (Yes I have been kicking myself for not making a backup for the last 8 hours). From the command line I can access all our old data so I am thinking I missed something in the make of this thing.
Thanks for you help.
Thanks for you help.
If you are using PHP, as I know you should use:
mysql_connect to connect to the server, and which will take parameters in different way. Then you should choose your DB using
Here they are:
int mysql_connect(string [hostname [:port] [:/path/to/socket] ] , string [username] , string [password] );
int mysql_select_db(string database_name, int [link_identifier] );
What you were asing, is used at console, but try these using PHP,
O.K I hope this will help.
mysql_connect to connect to the server, and which will take parameters in different way. Then you should choose your DB using
Here they are:
int mysql_connect(string [hostname [:port] [:/path/to/socket] ] , string [username] , string [password] );
int mysql_select_db(string database_name, int [link_identifier] );
What you were asing, is used at console, but try these using PHP,
O.K I hope this will help.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Then we can look into it.
Kurman.