-
How to set mysql password
The normal way of setting a password for mysql does not work on opensuse
11.0
>
> localhost:/etc # mysqladmin -u root password xxx
> mysqladmin: connect to server at 'localhost' failed
> error: 'Access denied for user 'root'@'localhost' (using password:
> YES)'
>
Suse is using some strange /etc/my.cnf file which has the following
section
> # The following options will be passed to all MySQL clients
> [client]
> #password =xxx
> port = 3306
> socket = /var/lib/mysql/mysql.sock
Using this password entry changes the "password: YES" or "password: NO"
answer.
Now I am totally lost on configuring mysql and doing such simple tasks
as setting of root password.
Any help appreaciated, also any introduction into the how and why suse
does it the way it works (which is different to usually).
--
mattposp
------------------------------------------------------------------------
mattposp's Profile: http://forums.opensuse.org/member.php?userid=9149
View this thread: http://forums.opensuse.org/showthread.php?t=401594
-
Re: How to set mysql password
How far have you have in setting passwords? Normally mysql has no
passwords set when it is installed. It also comes with an anonymous user
which needs a password adding and both root and the anonymous user have
accounts on both hosts.
So you should simply start with -u root and add passwords for both root
and the anonymous user or delete the anonymous user on both hosts.
By the way how you log on is not recommended by mysql. Using -u
<username> -p
and then typing the password in at the prompt is the recommended way of
logging in.
--
john_hudson
------------------------------------------------------------------------
john_hudson's Profile: http://forums.opensuse.org/member.php?userid=1134
View this thread: http://forums.opensuse.org/showthread.php?t=401594
-
Re: How to set mysql password
Try this:
Code:
--------------------
mysqladmin -u root -p password <new password here>
--------------------
mysqladmin will ask you for the root password. Leave the *Enter
password:* empty.
--
http://yami.googlecode.com/
http://akoskm.blogspot.com/
------------------------------------------------------------------------
ram88's Profile: http://forums.opensuse.org/member.php?userid=1058
View this thread: http://forums.opensuse.org/showthread.php?t=401594
-
Re: How to set mysql password
john_hudson;1907274 Wrote:
> How far have you have in setting passwords? Normally mysql has no
> passwords set when it is installed.
>
As far as I know, not at all. Especially because all option on the
commandline fail.
john_hudson;1907274 Wrote:
>
> So you should simply start with -u root and add passwords for both root
> and the anonymous user or delete the anonymous user on both hosts.
>
Not possible
>
> localhost:/etc # mysql -u root
> ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using
> password: NO)
>
john_hudson;1907274 Wrote:
>
> By the way how you log on is not recommended by mysql. Using -u
> <username> -p
> and then typing the password in at the prompt is the recommended way of
> logging in.
I do not even want to lock in. I have never ever logged in. I only want
to set the password so that I can use phpmyadmin and install websystems
such as wordpress.
If it is totally messed - does it help to uninstall mysql?
--
mattposp
------------------------------------------------------------------------
mattposp's Profile: http://forums.opensuse.org/member.php?userid=9149
View this thread: http://forums.opensuse.org/showthread.php?t=401594
-
Re: How to set mysql password
ram88;1907280 Wrote:
> Try this:
> >
Code:
--------------------
> >
> mysqladmin -u root -p password <new password here>
>
--------------------
> >
> mysqladmin will ask you for the root password. Leave the *Enter
> password:* empty If you haven't changed root password before.
> Good luck.
Not possible:
>
> localhost:/etc # mysqladmin -u root -p password
> Enter password:
> mysqladmin: connect to server at 'localhost' failed
> error: 'Access denied for user 'root'@'localhost' (using password:
> YES)'
>
--
mattposp
------------------------------------------------------------------------
mattposp's Profile: http://forums.opensuse.org/member.php?userid=9149
View this thread: http://forums.opensuse.org/showthread.php?t=401594
-
Re: How to set mysql password
Where did you install mysql from? What version of openSUSE are you
running?
have you run the command "/etc/init.d/mysql status" as root?
--
msounhein
------------------------------------------------------------------------
msounhein's Profile: http://forums.opensuse.org/member.php?userid=16980
View this thread: http://forums.opensuse.org/showthread.php?t=401594
-
Re: How to set mysql password
msounhein;1907300 Wrote:
> Where did you install mysql from? What version of openSUSE are you
> running?
> have you run the command "/etc/init.d/mysql status" as root?
Installed is
>
> localhost:/etc # rpm -qa | grep mysql
> libmysqlclient15-5.0.51a-27.1
> libqt4-sql-mysql-4.4.3-28.1
> mysql-tools-5.0.51a-27.1
> libmysqlclient_r15-5.0.51a-27.1
> perl-DBD-mysql-4.006-41.1
> mysql-gui-tools-5.0r12-195.1
> mysql-client-5.0.51a-27.1
> mysql-5.0.51a-27.1
> mysql-query-browser-5.0r12-195.1
> mysql-workbench-5.0r12-195.1
> php5-mysql-5.2.6-0.6
>
mysql is installed from Main Repository (11.0)
and 'status' results in
>
> localhost:/etc # /etc/init.d/mysql status
> Checking for service MySQL:
> running
>
If (however) a password for root would be set, how could I reset that?
--
mattposp
------------------------------------------------------------------------
mattposp's Profile: http://forums.opensuse.org/member.php?userid=9149
View this thread: http://forums.opensuse.org/showthread.php?t=401594
-
Re: How to set mysql password
If nothing helps, maybe something irregular happened...
Please copy and paste this text:
*lost mysql root password*
into Google.
--
http://yami.googlecode.com/
http://akoskm.blogspot.com/
------------------------------------------------------------------------
ram88's Profile: http://forums.opensuse.org/member.php?userid=1058
View this thread: http://forums.opensuse.org/showthread.php?t=401594
-
Re: How to set mysql password
I have been using this guide:
'Linux - Vergessenes root-Kennwort neu festlegen'
(http://tinyurl.com/65kv7a)
(german, but the commands should be clear)
It worked, but now I cannot start mysql:
>
> localhost:/var/lib/mysql # /etc/init.d/mysql start
> Starting service MySQL warning: /var/lib/mysql/mysql.sock didn't appear
> within 30 seconds
>
> done
>
--
mattposp
------------------------------------------------------------------------
mattposp's Profile: http://forums.opensuse.org/member.php?userid=9149
View this thread: http://forums.opensuse.org/showthread.php?t=401594
-
Re: How to set mysql password
Did you have any data already in /var/lib/mysql from a previous
install?
If you have never put any data in mysql before, a faster way to fix the
root password is to delete /var/lib/mysql and reinstall the mysql
package. Then set the password as documented, using
>
> mysqladmin -u root password -new-password-
The non-italic words are typed as-is. Don't use -p this first time. -p
is actually -p'' and implies you have already set a password, which you
haven't, with a fresh install. It's ok to set the password on the
command line this first time.
--
ken_yap
------------------------------------------------------------------------
ken_yap's Profile: http://forums.opensuse.org/member.php?userid=221
View this thread: http://forums.opensuse.org/showthread.php?t=401594
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
Bookmarks