Koozali.org: home of the SME Server
Legacy Forums => Experienced User Forum => Topic started by: calvin on February 28, 2006, 03:40:58 PM
-
Hi, i am using sme 7 pre3 everything seems ok, but i can't access mysql
I receive this error :
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
I try everything that I found in the forum but nothing until now,
someone have a solutions for this
thanks Calvin
-
Hi, i am using sme 7 pre3 everything seems ok, but i can't access mysql
I receive this error :
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
What exactly are you trying to do?
I try everything that I found in the forum but nothing until now,
someone have a solutions for this
You should start by telling people what you've done to get your system into this state. As it comes out of the box, the root user can access mysql by just typing "mysql" - no need to know or provide a password.
-
Same error here... so let explay how I get here:
1) Installed SME7pre3
2) updated it + signal-events (including reboot)
3) mysql < /tmp/mysql.dump (restore of my OLD mysql database)
What I already did:
1) verified that /root/.my.cnf contain a random string ... was not sure if it's my old one of my new one
2) noted as .my.cnf was a template... great!
# /sbin/e-smith/expand-template /root/.my.cnf
everything was the same.
3) If I try to stop mysqld with: /etc/rc.d/init.d/mysql stop it's ok... but restart it ... don't work.
4) If I want it back up I do service mysqld [restart|start]
5) I installed phpmyadmin from http://mirror.contribs.org/smeserver/contribs//dmay/smeserver/7.x/smeserver-phpmyadmin-2.6.4-pl4.dmay.noarch.rpm as by http://forums.contribs.org/index.php?topic=30888.0
but after login I receive exactly same error (1045).
Any help/tip?
Thanks
Jáder
-
Try "passw0rd" (and that's a zero not an O)
:-o
-
didn't worked! :(
Any other tip?
-
Hi
After do some search I discovered:
1) This is almost a FAQ (exist at least 2 bugs on bug tracker: 73 & 182)
2) I can see the error message on /var/log/mysqld/current : it was a old password error!
So I went here: http://dev.mysql.com/doc/refman/5.0/en/resetting-permissions.html
as by FAQ to get a solution:
#
shell> kill cat /mysql-data-directory/host_name.pid
Note the use of backticks rather than forward quotes with the cat command; these cause the output of cat to be substituted into the kill command.
#
Create a text file and place the following command within it on a single line:
SET PASSWORD FOR 'root'@'localhost' = PASSWORD('MyNewPassword');
Save the file with any name. For this example the file will be ~/mysql-init.
#
Restart the MySQL server with the special --init-file=~/mysql-init option:
shell> mysqld_safe --init-file=~/mysql-init &
The contents of the init-file are executed at server startup, changing the root password. After the server has started successfully you should delete ~/mysql-init.
#
You should be able to connect using the new password.
I did the above (created a /tmp/sqlpwd file and started mysqld_safe with init-file=/tmp/sqlpwd&
This changed password to "MyNewPassword'" so I stopped mysql (service mysqld stop), changed MyNewPassword on /tmp/sqlpwd with my random password from /root/.my.cnf and restarted again in safe mode.
Now my MySQL password is the same as on .my.cnf file.
So, I restarted MySQL and everything appears to be ok.
command line mysql AND PHPMyAdmin are working!
Gordon & others: sorry to be crossposting here from BugTracker... I believe some people will not search on BugTracker (besides to have several bugs with almost same problem). So this document a tested solution.
Jáder
-
Gordon & others: sorry to be crossposting here from BugTracker... I believe some people will not search on BugTracker (besides to have several bugs with almost same problem). So this document a tested solution.
People *need* to search the bug tracker - that's where issues are tracked.
Please raise your suggestion in the bug tracker in the SME Server Documentation/FAQ category so that a correct recipe can appear in the FAQ.
The issue is that the manual database restores are overwriting the correct MySQL root password. This is properly dealt with in a system upgrade, but if you restore a database dump with a root password you will break it again.
-
I installed it on my 6.5 a long time ago and had the same problem. I am always able to login as admin and use my sme admin password. It only does that to me on SME though.
-
I just had the same problem.
- I Upgraded 6.0.1 to 7.0
- I had a lot of problem after that. So I decided to backup everything with the server-manager on a workstation. I use XOOPS. So I decided to use mysqldump to backup my database.
- I installed SME-7.0
- I backup /root directory of the new SME-7.0 to a temp directory. I include all the files even all the . files.
- Then I restored manually from the files in the tar file.
- I restored manually the /root directory, including the .files and I overwrote all the files. even the my.cnf (this was the problem). After that I was no more able to access mysql.
- I search the forum and I found this thread. In it there was somebody saying something about that file.
- I compared the my.cnf that was created with the new SME-7.0 with the one that server-manager backed-up.
- The encrypted passwords were different.
- I put back the my.cnf created with the new SME-7.0 to its original place in /root.
- Victory on the western front. I was now able to access mysql.
So definitively the my.cnf was the problem. :pint:
- I didn't reboot yet... because of
#------------------------------------------------------------
# DO NOT MODIFY THIS FILE! It is updated automatically by the
# e-smith server and gateway software. Instead, modify the source
# template in the /etc/e-smith/templates directory. For more
# information, see http://www.e-smith.org.
#
# copyright (C) 1999-2001 e-smith, inc.
#------------------------------------------------------------
I will send this reply, reboot, and see what will happen
Another funny thing I noticed is the size of my database for XOOPS. There is about 30KB difference between the one I did with mysqldump and the one server-manager did. My web page looks OK. Both backup of the database were done with about 10 minutes difference.
Micronator
-
.
Well, I'm back after a reboot.
Again: Victory on the western front.
I am still able to access mysql. :pint:
Micronator.
-
Hello
I am newbie to linux. I have been trying to get php myadmin running for about 2 days. I am confused
Have read a lot and confused myself a lot.
Running sme linux 7.0 I have down local network command to allow acces over the network. I can log in to my sql with command
mysql -u root. This works
When i try to connect over the web.
When propmted for username password i have tried root with my root password which is set to admin to log into the console. Is this correct.
I have viewed my /etc/my.cnf file but i don't see any password in there. I have a feeling that there is a problem with the password somewhere. it mentions about a .my.cnf.swp file ???
I have tried grant priveleges to the *.* database but no different
Any help appreciated as i am confused
Cheers
Pete :?:
-
I have viewed my /etc/my.cnf file but i don't see any password in there. I have a feeling that there is a problem with the password somewhere. it mentions about a .my.cnf.swp file ???
/root/.my.cnf
-
Hello
I am newbie to linux. I have been trying to get php myadmin running for about 2 days. I am confused
More details required.
Where are you getting phpmyadmin from ?
-
Hi William
Its good to get an aussie response !!
The phpmyadmin is from here
when i read what u said i remeber reading something about using software that has been tested with sme !!! so maybe this ain't the right phpmyadmin ?? I should check this fist off i suppose.
I tried to go to the irc links in you last post it didn't work. What is an irc link.
-
The phpmyadmin is from here
Here where ?
Install MasterSleepys one........
wget http://www.vhconsult.com/download/sme70/phpmyadmin-multiuser/smeserver-phpmyadmin-multiuser-2.9.1.1-1.noarch.rpm
then
yum localinstall smeserver-phpmyadmin-multiuser-2.9.1.1-1.noarch.rpm
Login with Username admin and Password admin (admin is the password)
Plenty of 'skips' on the forum.. :)
-
I tried to go to the irc links in you last post it didn't work. What is an irc link.
Internet Relay Chat.
You will need a IRC client
Try
http://www.mirc.com/
or
http://www.mozilla.org/projects/rt-messaging/chatzilla/
-
Jee your quick, I just realised i forgot the link, and just found master sleep page in another post.
Will dowmload and try
is noarch.rpm the file and is yum to install that file ?
I got to do a crash course in unix !!
Cheers
-
The steps will be...
cd /tmp
wget http://www.vhconsult.com/download/sme70/phpmyadmin-multiuser/smeserver-phpmyadmin-multiuser-2.9.1.1-1.noarch.rpm
yum localinstall smeserver-phpmyadmin-multiuser-2.9.1.1-1.noarch.rpm
signal-event post-upgrade
signal-event reboot
You are changing to the temp directory.
wget will download the file to the tmp directory similar to how a browser will do it.
yum will install the downloaded file. Because we already have the file we use the localinstall command.
Next is some sme magic to ensure the system is in a known state.
-
Thanks william.
I got it flying last night. Though the way i ve seen it done before and the way i was doing it prevoiusly was installing phpmyadmin into an ibay, then configureing things from there.
Doing this way (which does work) it seems to install phpmyadmin into phpadmin, as displayed by the browser, but this doesnot diplay under the ibays ??. Is it instslled in the guts of linux somewhere. just want to understand so i know how to fix it when/if it breaks.
What the differnece in the php myadmin's available is interesting. I was looking on the contribs site for something that listed what was compatiable with sme 7.0 but had no luck
Thanks for your help
Pete :lol:
-
Doing this way (which does work) it seems to install phpmyadmin into phpadmin, as displayed by the browser, but this doesnot diplay under the ibays ??. Is it instslled in the guts of linux somewhere. just want to understand so i know how to fix it when/if it breaks.
Correct. It is not in an iBay. It's located under /opt/administration
The 86PhpmyadminmultiAlias script in /etc/e-smith/templates-custom/etc/httpd/conf/httpd.conf which gets incorporated into /etc/httpd/conf/httpd.conf is what tells the webserver what to give to the browser.
-
What the differnece in the php myadmin's available is interesting. I was looking on the contribs site for something that listed what was compatiable with sme 7.0 but had no luck
List of contribs.
http://no.longer.valid/phpwiki/index.php/SME7Contribs
Maybe when the new Wiki arrives they will get updated.
-
pcp20us, you need to create a user for yourself within mysql. Don't change the root password.
# mysql
mysql> GRANT ALL PRIVILEGES ON *.* TO myuser@localhost IDENTIFIED BY 'password' WITH GRANT OPTION;
mysql> quit