机子上装了MySQL已经有一段时间了,今天再去连接发现报错1045,很奇怪,密码应该没问题啊,于是网上搜索了下解答,记录下。
系统:Windows 7
版本:MySQL5.0
问题:1045 access denied for user ‘root’@'localhost’ using password yes
解决方法:
1.停止MySQL服务
2.运行cmd
3.进入到MySQL安装bin目录 cd C:\Program Files\MySQL\MySQL Server 5.0\bin
4.运行 mysqld – -defaults-file=”C:\Program Files\MySQL\MySQL Server 5.0\my.ini” – -console – -skip-grant-tables
提示以下信息说明MySQL已经运行成功:
111230 10:53:40 InnoDB: Started; log sequence number 0 558063
111230 10:53:40 [Note] mysqld: ready for connections.
Version: ’5.0.27-community’ socket: ” port: 3306 MySQL Community Edition (GP
L)
5.再打开一个cmd窗口,进入到MySQL安装bin目录 cd C:\Program Files\MySQL\MySQL Server 5.0\bin
6.输入mysql -uroot mysql 提示以下信息
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 2
Server version: 5.1.33-community-log MySQL Community Server (GPL)
Type ‘help;’ or ‘\h’ for help. Type ‘\c’ to clear the buffer.
mysql>
7.输入 update user set password=password(‘root’) where user=’root’; 回车
提示以下信息则成功
Query OK, 1 row affected (0.01 sec)
Rows matched: 2 Changed: 1 Warnings: 0
8.输入flush privileges; 回车
提示以下信息则成功
Query OK, 0 rows affected (0.01 sec)
9.quit
10.输入mysql -uroot -proot
提示以下信息则成功
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 3 to server version: 5.0.27-communit
Type ‘help;’ or ‘\h’ for help. Type ‘\c’ to clear the buffer.
mysql>
到此1045异常解决完毕。Linux也可以参照以上方法解决。
本文参考:http://topic.csdn.net/u/20090515/21/2b3c9a12-d8a5-4bb1-9895-6069cef5aef8.html
and wigs may also be employed. there…
isn’t any scientific evidence that the use of lasers, vitamins, herbs or lotions is successful.another point of view that is to some extend opposed to the theory of inherited disposition is focuses attention on the blood flow. so it’s not testosteron…
symptoms of vaginal discomfort associated with menopause…
include vaginal soreness or pain, dryness and itching. this happens because of the low level of estradiol. once you have the prescription from your doctor you can now buy estradiol vaginal cream so you can commence using the medication.as a treatment…
tax, credit card entered online, etc. it…
is also great to see the product in person before purchasing. craigslist slips because if one lives in a rural region of the country, very few ads are available and finding what you need may be difficult. secondly, craigslist is prone…
as the ability to turn corners more…
quickly. however, unless you frequently zoom around corners or hit the track for a few laps, the performance benefits will be hard to notice. most drivers select low-profile tires simply for their sleek appearance.in terms of the appearance aspect of r…
cooked lobster on the grill with the…
flesh side down for 4 to 5 minutes, or until light grill marks show. flip lobster tail to shell side down. continue basting with the butter mixture during the next 5 to 10 minutes cooking, depending on the size, or until…
carefully, you will notice a small letter…
b in the image of the buckle which adds a smart touch to the monogram.3. hot topic: this retail chain store specializes in everything that can appeal to the youth; from music to clothing to accessories. their emblem is also designed…
a standard rf connector port available so…
you can hook up a tuner to drive the high-definition receiver. there’s also a standard rs-232c port for control and service. it comes with its own stand that is designed to swivel, but not tilt.overall, the lv 42lv4400 works as advertised….
are easy ways to test yourself at…
home for the candida fungus without having to pay for expensive test kits or for your physician to check you out. when you wake up in the morning do not put anything in your mouth, including water and mouthwash. go to…
glands (sebaceous glands) on the penis which…
are harmless but may cause sensitivity at times.yeast infection symptoms – conclusionsome of the most common symptoms of a yeast condition may in reality be the symptoms of something more complex such as an std. you should know what your condition…
just the same, you’re still sin some…
small way, keeping money from flowing out of your pockets and into a more productive venture. is why the rich becomes richer? maybe, but certainly, it makes them lose less of it.remember those coupons you get from burger joints and food…
of the conditions that arise when you…
attempt to stop smoking. withdrawal symptoms such as nervous tension and anxiety are usually present when you attempt to quit. these symptoms can be eased by using certain herbal remedies. even nicotine cravings can be eased with the use of some…
particular herb are very limited and further…
research, as is true of many medicinal herbs, are still needed.in conclusion:there are many erectile dysfunction herbs and vitamins on the market today that are shown to be significantly effective as part of a regime to treat and cure erectile dysfunct…
digestion problems with calming attributes.here are some…
of the herbs that you might find in a natural concoction of herbs:1- lobelia: regarded as an important herb that calm the mind and relax the body. it is a well known herb that helped many people to moderate their need…
if we have the desire to sparkle…
our personality in conversation. we must have the ability to impress others by our conversation.we must keep our brain and nervous system healthy so that we may be able to develop our skills to the level at which our natural potential…
and the wind blowing.fishing holiday and australia…
goes hand in hand and for good reasons. australia is the best known fishing locations in the world. from the different types of fish available in the waters that surrounds the country to all the different fishing options, it is truly…
you ask “do i need an umbrella?”,…
it will understand the request as to what the weather is like and answer the question appropriately. you can also input new events and meetings into your calendar using the intuitive and almost futuristic application. other capabilities include being a…
the customer support and service program, there…
has evolved out an utter rise in the demand of the inbound call center services. to strengthen the business and to reflect the business in a positive shade to the customers, the business strongly needs to have well-trained and experienced agents…
along on your running workout. running with…
a friend can be a motivator, especially if they’re in better shape than you. this is because a running partner who is fitter than you can stand as a tangible representation of your goals, where you want to be in the…
users.what feels good to the web visitor?…
the web visitor appreciates a page that will load quickly and that will be viewable in almost any context. with the advent of technologies such as smartphones and tablets, you have to stay on top of the presentation style of your…
keeping liquids sealed safely within. the great…
thing about such a travel mug is the fact that if it does not fit your car’s drink holder you can simply lay it on your seat or the ground and rest assured that not a single drop will spill.this particular…
thicker bags such as the 4-mil ones….
these bags are made of low density polyethylene for added strength and puncture resistance. these bags are extremely handy for packaging electronic components that need to be protected from static charge. with these part bags, you can store a variety o…
legal requirements. for those who have a…
set of plans already available with them, your custom home designers can help you make the necessary alterations to meet the architectural demands of the plot location and its shape. the large atrium that you always dream t about can easily…
research gap between the large independent innovation…
capacity and in new materials new technologies new technology research and application in a more horizontal long product development cycle so far we do not have a tire test site br fifth the gap between business ideas many of our local…
desired outcomes, pumping more funds into it…
won’t make a difference. google adwords isn’t the same as conventional internet advertising. as such, a different set of guidelines or rules apply. it’s best to start small. taking off with a bang can have fatal repercussions. choose awesome keyword…
you’ve probably heard that backlinks are one…
of the vital cogs that make seo (search engine optimization) work, but that still doesn’t explain what they are or how you get them. what they are is rather simple. backlinks are links placed on other sites that lead back to…
she should have many cases similar to…
your own under his or her belt. furthermore, your attorney should have trial experience. depending on your case, you may have to fight in court and your lawyer must be someone who is ready to handle a trial. additionally, your criminal…
to seek a “work permit” if he…
is a first offender within 5 years. the license of a person under age 21, however, will be revoked if the criminal case results in a conviction.if a defendant is acquitted of dui, or the dui is otherwise dismissed, the als,…
overreacting to the influx of the immoglobin…
e. this results in the characteristic symptoms of an allergic reaction, such as watery eyes, sneezing, hives or a skin rash, and stomach discomfort or pain. if suffering from these symptoms, the use of an antihistamine may be beneficial. the severity…
to reapply to the dmv and prove…
to them that you are a fit and proper person to hold a license.hiring a lawyer will give you the best chance of being acquitted of all charges or of obtaining a more lenient sentence. you should be aware that not…
goes into great detail on it in…
his book. fresh out of ideas, until next time! the main excuse amongst the general public seems to be “i don’t have enough time in my busy schedule to get a workout in”. well i am here to tell you that…
knowledge to adequately represent yourself and to…
present evidence which will support your claims. if the judge feels you do not have these skills then they will appoint a lawyer to you. in the majority of cases, hiring a tampa criminal lawyer in the first instance can save…
police in check, or it will cost…
you quite a lot of money.and when it comes down to the worst, you will be forced to outrun the police and you got to have a set of wheels to make sure you keep them at bay. you would not…
favorite design and have a good jeweler…
make it.alternative metals for wedding bandswhite metal is perhaps not really unconventional, but it is not as common as yellow gold, for example. one advantage to white gold is the fact that it is harder than plain gold. it is coated…
the year for a tax audit.10. hire…
the most experienced tax firm you can find. make sure they have former irs agents on staff. internal revenue services, or commonly known as irs, is a tax collection agency that implements harsh actions and penalties on the people who turn…
that can be fatal. you should be…
very careful about what you feed your bulldog as it directly impacts on the lifespan of your dog. treating your do kindly and grooming it regularly will ensure that you and your pet enjoy each others company. english bulldogs are one…
equity is a result of the car…
no longer being brand new and thereby losing its most valued attribute. for any person looking to buy a car on used cars a budget a brand new car will almost always be a bad decision. if you are intent on buying a…
so as to offer you the best…
assistance possible. with something as significant as your personal freedom at stake, you owe it to yourself to do your part. if you are curious about how to getting the most out of your retained representative, then read on for advice.your…
misplaced in there. but if your closet…
was well organized, finding your earrings would not be such a big problem. same as your debt bills. you should have a well organized approach to your debt so you always have the upper hand, which leads to better control.if you’re…
to adjust the volume! created for mild…
to severe hearing losses, the siemens motion comes fully loaded with features that make it the perfect choice for a diverse range of hearing aid users.tired of buying and replacing those tiny batteries? not a problem. the siemens motion bte models…
bring beverages, and even have areas for…
singing and hanging out. included in your entrance fee is usually a locker, towel, bathrobe, and flip flops.voice of experience there is no national list of public bath houses, so the first step is determining your spot through online searches. through…