473,770 Members | 5,569 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

MYSQL + Win32 = Difficulties

Hello,

I've a newbie to MySQL. I've installed it on Windows and assigned a
password to the root user. Now when I log in I do the following:

C:\mysql\bin>my sql -u root -p
Enter password: *****

But all I get is:

ERROR 1045: Access denied for user: 'root@localhost ' (Using password:
YES)

I can't seem to find an answer as to why i'm hitting this problem. Can
someone please explain?

Many thanks in advance.
Jul 20 '05 #1
12 1400
Obi Wan Shinobi wrote:
I've a newbie to MySQL. I've installed it on Windows and assigned a
password to the root user. Now when I log in I do the following:
How did you assign it? It is common problem for newbies that they think
they assigned a password but they haven't actually done it.
C:\mysql\bin>my sql -u root -p
Enter password: *****


What happens if you try:
C:\mysql\bin>my sql -u root

If you get in that way, it means that there is no password set for root.
If that fails also, it means that there is password set for root user,
but you seem to fail to type it correctly. In that case you need to
reset the root password and set it again.
Jul 20 '05 #2
Obi Wan Shinobi wrote:
I've a newbie to MySQL. I've installed it on Windows and assigned a
password to the root user. Now when I log in I do the following:
How did you assign it? It is common problem for newbies that they think
they assigned a password but they haven't actually done it.
C:\mysql\bin>my sql -u root -p
Enter password: *****


What happens if you try:
C:\mysql\bin>my sql -u root

If you get in that way, it means that there is no password set for root.
If that fails also, it means that there is password set for root user,
but you seem to fail to type it correctly. In that case you need to
reset the root password and set it again.
Jul 20 '05 #3
Obi Wan Shinobi wrote:
I've a newbie to MySQL. I've installed it on Windows and assigned a
password to the root user. Now when I log in I do the following:
How did you assign it? It is common problem for newbies that they think
they assigned a password but they haven't actually done it.
C:\mysql\bin>my sql -u root -p
Enter password: *****


What happens if you try:
C:\mysql\bin>my sql -u root

If you get in that way, it means that there is no password set for root.
If that fails also, it means that there is password set for root user,
but you seem to fail to type it correctly. In that case you need to
reset the root password and set it again.
Jul 20 '05 #4
Thanks for replying
How did you assign it? It is common problem for newbies that they think
they assigned a password but they haven't actually done it.
C:\mysql\bin>my sql -u root password 'rootpassword'
What happens if you try:
C:\mysql\bin>my sql -u root


I log in. But then again I can put in anything in the place of 'root'
and it will log in (it says Welcome to the MySQL monitor). It doesn't
even turn me away if I type in a random name.

Thanks
Jul 20 '05 #5
Thanks for replying
How did you assign it? It is common problem for newbies that they think
they assigned a password but they haven't actually done it.
C:\mysql\bin>my sql -u root password 'rootpassword'
What happens if you try:
C:\mysql\bin>my sql -u root


I log in. But then again I can put in anything in the place of 'root'
and it will log in (it says Welcome to the MySQL monitor). It doesn't
even turn me away if I type in a random name.

Thanks
Jul 20 '05 #6
Thanks for replying
How did you assign it? It is common problem for newbies that they think
they assigned a password but they haven't actually done it.
C:\mysql\bin>my sql -u root password 'rootpassword'
What happens if you try:
C:\mysql\bin>my sql -u root


I log in. But then again I can put in anything in the place of 'root'
and it will log in (it says Welcome to the MySQL monitor). It doesn't
even turn me away if I type in a random name.

Thanks
Jul 20 '05 #7
Obi Wan Shinobi wrote:
What happens if you try:
C:\mysql\bin> mysql -u root

I log in. But then again I can put in anything in the place of 'root'
and it will log in (it says Welcome to the MySQL monitor). It doesn't
even turn me away if I type in a random name.


Let me explain something. If you log in when you use username 'root',
you either get in or you won't get it. If you get it, you will have root
privileges. If you however use another username, a username that either
doesn't exists or is 'test', then you will by default be logged in as
user 'test' and you will have access to test database only.

So what has happened here is this:
- You failed to set password for root
- That means you don't yet have any password for root

Log in to mysql with this command:
C:\mysql\bin>my sql -u root

And once you get inside, type in this command (convert the some password
text with the password you prefer).

SET PASSWORD FOR root = PASSWORD('some password');

After that you should have root password set. Try log out, and then try
again:

C:\mysql\bin>my sql -u root

This time you shouldn't get it. Try

C:\mysql\bin>my sql -u root -p

And you should be asked for password. And once you have given it
correctly, you should get in as root.

Or try to log in as a test user, try

C:\mysql\bin>my sql -u whatever

And you should get in, but without root privileges.
Jul 20 '05 #8
Obi Wan Shinobi wrote:
What happens if you try:
C:\mysql\bin> mysql -u root

I log in. But then again I can put in anything in the place of 'root'
and it will log in (it says Welcome to the MySQL monitor). It doesn't
even turn me away if I type in a random name.


Let me explain something. If you log in when you use username 'root',
you either get in or you won't get it. If you get it, you will have root
privileges. If you however use another username, a username that either
doesn't exists or is 'test', then you will by default be logged in as
user 'test' and you will have access to test database only.

So what has happened here is this:
- You failed to set password for root
- That means you don't yet have any password for root

Log in to mysql with this command:
C:\mysql\bin>my sql -u root

And once you get inside, type in this command (convert the some password
text with the password you prefer).

SET PASSWORD FOR root = PASSWORD('some password');

After that you should have root password set. Try log out, and then try
again:

C:\mysql\bin>my sql -u root

This time you shouldn't get it. Try

C:\mysql\bin>my sql -u root -p

And you should be asked for password. And once you have given it
correctly, you should get in as root.

Or try to log in as a test user, try

C:\mysql\bin>my sql -u whatever

And you should get in, but without root privileges.
Jul 20 '05 #9
Obi Wan Shinobi wrote:
What happens if you try:
C:\mysql\bin> mysql -u root

I log in. But then again I can put in anything in the place of 'root'
and it will log in (it says Welcome to the MySQL monitor). It doesn't
even turn me away if I type in a random name.


Let me explain something. If you log in when you use username 'root',
you either get in or you won't get it. If you get it, you will have root
privileges. If you however use another username, a username that either
doesn't exists or is 'test', then you will by default be logged in as
user 'test' and you will have access to test database only.

So what has happened here is this:
- You failed to set password for root
- That means you don't yet have any password for root

Log in to mysql with this command:
C:\mysql\bin>my sql -u root

And once you get inside, type in this command (convert the some password
text with the password you prefer).

SET PASSWORD FOR root = PASSWORD('some password');

After that you should have root password set. Try log out, and then try
again:

C:\mysql\bin>my sql -u root

This time you shouldn't get it. Try

C:\mysql\bin>my sql -u root -p

And you should be asked for password. And once you have given it
correctly, you should get in as root.

Or try to log in as a test user, try

C:\mysql\bin>my sql -u whatever

And you should get in, but without root privileges.
Jul 20 '05 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

11
3263
by: George Augustino | last post by:
REQUEST FOR DISCUSSION (RFD) unmoderated group comp.databases.mysql Newsgroup line: comp.databases.mysql MySQL relational database system discussion group. This is a formal Request For Discussion (RFD) for the creation of a world-wide unmoderated Usenet newsgroup comp.databases.mysql. This is not a Call for Votes (CFV); you cannot vote at this time. Procedural details are below.
3
1933
by: Jon Miller | last post by:
We've run out of disk space and would like to move either the entire MySQL = system or if possible move the databases. Can this be done without any = difficulties? Thanks Jon L. Miller, MCNE, CNS Director/Sr Systems Consultant MMT Networks Pty Ltd http://www.mmtnetworks.com.au
0
832
by: Obi Wan Shinobi | last post by:
Hello, I've a newbie to MySQL. I've installed it on Windows and assigned a password to the root user. Now when I log in I do the following: C:\mysql\bin>mysql -u root -p Enter password: ***** But all I get is:
2
2125
by: Terabyte | last post by:
I want to learn MySQL. I started reading the book MySQL by Paul DuBois, second edition. I have the option of downloading and installing a copy of MySQL on my computer (PC) or use MySQL provided by my ISP. The question is how do I use/reach MySQL on my ISP's server? It appears easy enough to setup the database usernames etc. since the setup and maintenance are done through an interface. In the book there is a sample database that I am...
0
2130
by: Veli-Pekka Tätilä | last post by:
Hi, My first post here. I've found some serious accessibility flaws in the Python 2.4 docs and wish they could be rectified over time. I'm very new to Python and initially contacted docs at python org, However, I haven't gotten a reply for a week or so, and figured out I could post here for a larger audience, then. Original message follows: Hello,
11
9950
by: Mark Cubitt | last post by:
the reason I ask is I have always used postgres at home and work, but my new web host only has mysql :( I want to know what sort of differences I will have in regards to programming php/perl webpages using the database. I current use sequences in postgres and understand this will be different in mysql, so can you tell me what the difference will be and if there are any other differences I should look out for.
2
3008
by: PHP_Paul | last post by:
Ok, I'm trying to poineer into the wonderful area of PHP/MySQL programming, but I'm having some difficulties. http://www.paulhq.com/php/freepage.html should register, but when anyone fills something out, it returns a MySQL error: Could not insert data because You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')' at line 1 Here are the codes: freepage.html...
3
4398
by: Cool Dude | last post by:
I installed PHP 5.2.4 on Apache 2.2.6 with MySQL 6.0.2 alpha on Windows XP Professional Service Pack 2 and everything is working fine but the MySQL extension for PHP. The error log in Apache says: PHP Warning: PHP Startup: Unable to load dynamic library 'H:\ \php-5.2.4-Win32\\ext\\php_mysql.dll' - Invalid access to memory location.\r\n in Unknown on line 0 Why does this happen? And, how can I cure this? Please reply at the earliest....
1
2414
by: chanshaw | last post by:
Alright so I got php running and installed i have mysql running and installed the thing im having a hard time with is having the php to call information from the mysql database. Im on Windows Vista Ultimate, I'm using iis7 here is the code of the php. <?php $Username = "Webuser"; $Password = "password"; $Database = "sample"; $Hostname = "localhost"; $MySQLConnection = mysql_connect($Hostname, $Username, $Password) ...
0
9592
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10231
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10059
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10005
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9871
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6679
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5452
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3576
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2817
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.