mysql password

classic Classic list List threaded Threaded
11 messages Options
Reply | Threaded
Open this post in threaded view
|

mysql password

leroi1990
hi i have a problem with my suse studio project

when i build my project every thing is working ok but i can't login to phpmyadmin

and also i cant login to mysql server from the command line

it always say access denied for user root

so what should i do to make enable phpmyadmin or what is the right way to install mysql server and phpmyadmin

thanks and sorry about my bad english
jdd
Reply | Threaded
Open this post in threaded view
|

Re: mysql password

jdd
Le 14/06/2013 10:45, leroi1990 a écrit :

> *hi i have a problem with my suse studio project
>
> when i build my project every thing is working ok but i can't login to
> phpmyadmin
>
> and also i cant login to mysql server from the command line
>
> it always say access denied for user root
>
> so what should i do to make enable phpmyadmin or what is the right way to
> install mysql server and phpmyadmin
>
> thanks and sorry about my bad english*


in french

http://dodin.org/wiki/index.php?n=Doc.MySQL-2#toc2

jdd


--
http://www.dodin.org
Reply | Threaded
Open this post in threaded view
|

Re: mysql password

leroi1990
thanks, but why mysql is not working directly after build

what is the way to build distribution with mysql already working

i want to download the distribution  from suse sudio with all my settings and files and give it to my clients and they should install it without any configuration. is this possible ?
Reply | Threaded
Open this post in threaded view
|

Re: mysql password

paulo
This was working previously but at some stage during the upgrade the default table of mysql and it's users got affected.

Before the mysql password was simple blank but now is not anymore. The only way I could find was to reset the password as described above.

In Suse Studio there is a section that allows you to add mysql users along with passwords. Again this used to work fine in the past but not any more.

If I recall correct, in SUSE 12.1 & SUSE 12.2 it worked fine. But not on SUSE 12.3

The only way you can work around it is to create a batch script that runs initial and perform the above tasks. Hopefully this will be fixed in future versions.
Reply | Threaded
Open this post in threaded view
|

Re: mysql password

leroi1990
i tried to do this steps several times
http://dodin.org/wiki/index.php?n=Doc.MySQL-2#toc2

after login to mysqld_safe whithou password and updating the root password then quit and restart mysql

the same problem access denied for root@localhost

can any one build a distribution in suse studio with a script doing the right steps to recovery password and share it for me ?

because i'm trying to solve this problem from a week ago but i can't
Reply | Threaded
Open this post in threaded view
|

Re: mysql password

paulo
I do it a little bit different than the information in that link. This is how I do it:

1) Stop mysql ( service mysql stop )
2) Edit /etc/my.cnf ( vi /etc/my.cnf )
3) In there in the server section add skip-grant-tables
4) Start Mysql (service mysql start)

At this stage you will be able to login to mysql just fine (no passwords will be prompted)

Now in console:

1) mysql
2) use mysql;
3) insert into user (Host, User, Password) values ('localhost','root','');
4) update user set Select_priv='Y',Insert_priv='Y',Update_priv='Y',Delete_priv='Y',Create_priv='Y',Drop_priv='Y',Reload_priv='Y',Shutdown_priv='Y',Process_priv='Y',File_priv='Y',Grant_priv='Y',References_priv='Y',Index_priv='Y',Alter_priv='Y',Show_db_priv='Y',Super_priv='Y',Create_tmp_table_priv='Y',Lock_tables_priv='Y',Execute_priv='Y',Repl_slave_priv='Y',Repl_client_priv='Y',Create_view_priv='Y',Show_view_priv='Y',Create_routine_priv='Y',Alter_routine_priv='Y',Create_user_priv='Y', Event_priv='Y', Trigger_priv='Y', Create_tablespace_priv='Y' where user='root';
quit;

(All these commands are ran in mysql console or via phpmyadmin)

Now the above commands tell mysql to create root user (as it does not exists in the distribution)

And we are all set, now revert back

A) Edit my.cnf (vi /etc/my.cnf )
B) remove: skip-grant-tables
C) service mysql start

and you are done (password is blank), update a new password using

mysqladmin -u root password XXXXXXXXXX

Replace XXXX with your pass

Reply | Threaded
Open this post in threaded view
|

Re: mysql password

rkachelriess
I ran into the same issue. I had to configure MySQL manually in the after build script; I could never get the automated setup to work.

I posted my solution a few weeks ago. I'm sure you could adapt it for your appliance. Here's the link to my post: http://suse-studio-users.1598176.n2.nabble.com/MySQL-Host-Localhost-is-not-allowed-to-connect-to-this-MySQL-Server-tp7578142p7578155.html.

I hope this helps.
Reply | Threaded
Open this post in threaded view
|

Re: mysql password

leroi1990
In reply to this post by paulo
thanks a lot paulo your method succeeded with me and i can login to phpmyadmin

now i need one step more

how i can convert this steps to batch script and execute this script at the first boot
Reply | Threaded
Open this post in threaded view
|

Re: mysql password

rkachelriess
leroi1990 wrote
thanks a lot paulo your method succeeded with me and i can login to phpmyadmin

now i need one step more

how i can convert this steps to batch script and execute this script at the first boot
Here's the steps for having a basic MySQL database set up, running, and accessible when your appliance first boots.

1. Add the mysql-community-server and phpMyAdmin packages on the Software tab.
2. In the Server tab of the Configuration tab make sure that "Set up MySQL" is unchecked.
3. In the Scripts tab of the Configuration tab, check "Run script at the end of the build".
4. Add the following to the end of the script (replace <MySQL_Password> with what you want it to be):

     chkconfig -a mysql
     rcmysql start
     mysqladmin -u root password '<MySQL_Password>'
     rcmysql stop

Now when you boot up your appliance, MySQL should be up and running and you should be able to log in using both the console and phpMyAdmin.
Reply | Threaded
Open this post in threaded view
|

Re: mysql password

leroi1990
This post was updated on .
rkachelriess, you are the best, my problem has been solved

i'm tried many methods from everywhere and writing scripts all the day

but you solved my problem with simple steps

thanks you very much, you made a big service for me

my english is so bad i know
Reply | Threaded
Open this post in threaded view
|

Re: mysql password

Rufus
In reply to this post by rkachelriess
This works.  Thanks.