Databases :: MySql :: Username & Password - Newbie |
|||
| By: Squibi |
Date: 14/04/2003 00:00:00 |
Points: 300 | Status: Answered Quality : Excellent |
|
Hi, I am a new user of MySQL and I am having trouble logging in. I am using MySQL 4.0.12 on NT4, I am also the MySQL Admin tool, but I want to start/stop the server using the command line. I have typed the following commands but don't receive any feedback from MySQL as it states in the manual. >mysqld-max --standalone >mysqld-max-nt --standalone I have also tried to login but I cannot - although I can log in as an anonmous user and view the mysql & test databases. This is the error message I receive when I try to login: >C:\mysql\bin>mysql -h 'host' -u 'user' -p Enter password: ****** ERROR 1045: Access denied for user: 'user@48.122.122.01' (Using password: YES) Any thoughts?? |
|||
| By: Ice_S5 | Date: 14/04/2003 21:12:00 | Type : Comment |
|
| I think you should try: mysql --user=root --password=newpw Then you can create your own databases. I recommend to grant access to chosen login/password for specified database. It's bad idea to use administrator's account for accessing database (inside your script/application). |
|||
| By: VGR | Date: 14/04/2003 22:08:00 | Type : Comment |
|
| why do you have @IPaddress in stead of @localhost ? I bet you don't have enabled host 48.122.122.01 for access in the GRANT tables... use -h 'localhost' for a start, get in (you should have the right password, don't you ? :d ) then alter table mysql.user or issue GRANT ... TO ... IDENTIFIED BY ... (see doc) then FLUSH PRIVILEGES and it should be it |
|||
| By: Squibi | Date: 14/04/2003 22:26:00 | Type : Comment |
|
| Hi, The ip address is my computers IP address. I have tried to use the localhost ip address and I still get the same error. I don't know the command to grant a user access to a db? (I also have mysql setup as an Win NT service.) |
|||
| By: VGR | Date: 14/04/2003 22:36:00 | Type : Comment |
|
| that's not a problem go to the "DOS" Console type : mysql if youreceive 'path not found", change directory to the bin of mysql installation (later on, add it to your PATH) type : mysql --user=root --password=yourpassword you should have the prompt and welcome message type : use mysql; select Host,User,Password from user; check presence of all hostnames and users you need to add a user : insert into user set Host='12.34.56.78', Password=PASSWORD('thepassword'), User='theusername'; when finished , type : flush privileges; exit; exit; done |
|||
| By: Squibi | Date: 14/04/2003 23:02:00 | Type : Comment |
|
| Hi, So to summarise: I had to add myself as a user to the host, using the administrator privilege (logging in as mysql). Once I had done this I was able to access mysql as a 'normal' user instead of an administrator. From here I should be able to create, modify & query mysql databases. |
|||
| By: VGR | Date: 14/04/2003 23:25:00 | Type : Answer |
|
| I think so ; at least that's the most probable mistake don't put users having access from all (%) hosts, especially for 'root' and try to restrict remote users. Readcarefully the online doc at <A HREF="http://www.mysql.com">www.mysql.com</a> (type in search boox : GRANT ) |
|||
| By: Squibi | Date: 15/04/2003 21:09:00 | Type : Comment |
|
| Hi, Thanks for the help, I now think I have my users separated from the administrator account. |
|||
|
Do register to be able to answer |
|||
| Add This Article To: | |||
| |
|
|
|
| |
|
|
|








