Opened 13 years ago

Closed 13 years ago

#29544 closed defect (invalid)

mysql5 root password reser

Reported by: IlushinDNS@… Owned by: macports-tickets@…
Priority: Normal Milestone:
Component: ports Version: 1.9.2
Keywords: Cc:
Port: mysql5-server

Description

I'm totally new to all of this.

I was installing python-django-mysql After installing mysql5 and mysql_server i ran

MacBook-Pro-Denis-Ilyushin:local IlushinDNS$ /opt/local/lib/mysql5/bin/mysql_secure_installation

and used black root password (as i just installed it) what i have got is

touch: .my.cnf.18576: Permission deniedtouch: .mysql.18576: Permission denied
chmod: .my.cnf.18576: No such file or directory
chmod: .mysql.18576: No such file or directory




NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MySQL
      SERVERS IN PRODUCTION USE!  PLEASE READ EACH STEP CAREFULLY!


In order to log into MySQL to secure it, we'll need the current
password for the root user.  If you've just installed MySQL, and
you haven't set the root password yet, the password will be blank,
so you should just press enter here.

Enter current password for root (enter for none): 
/opt/local/lib/mysql5/bin/mysql_secure_installation: line 85: .my.cnf.18576: Permission denied
/opt/local/lib/mysql5/bin/mysql_secure_installation: line 86: .my.cnf.18576: Permission denied
/opt/local/lib/mysql5/bin/mysql_secure_installation: line 87: .my.cnf.18576: Permission denied
/opt/local/lib/mysql5/bin/mysql_secure_installation: line 89: .my.cnf.18576: Permission denied
/opt/local/lib/mysql5/bin/mysql_secure_installation: line 58: .mysql.18576: Permission denied
/opt/local/lib/mysql5/bin/mysql_secure_installation: line 60: .mysql.18576: No such file or directory

I don't know what to do futher, i understand that i need password reset, but i dont know how to do that...

Please help

Change History (3)

comment:1 Changed 13 years ago by pixilla (Bradley Giesbrecht)

The mysql_secure_installation script as executed does not have permission to write to .my.cnf.

You could try:

$ sudo /opt/local/lib/mysql5/bin/mysql_secure_installation

The mysql5-server port should have end with this message:

******************************************************
* In order to setup the database, you might want to run
* sudo -u ${mysqluser} mysql_install_db5
* if this is a new install
******************************************************

Have you installed the mysql db files?

Also, if you don't have a /opt/local/etc/mysql5/my.cnf file consider copying one of the examples provided by mysql.
Example:

ls /opt/local/etc/mysql5/
ls /opt/local/share/mysql5/mysql/*.cnf
head -n15 /opt/local/share/mysql5/mysql/*.cnf
sudo cp /opt/local/share/mysql5/mysql/my-medium.cnf /opt/local/etc/mysql5/my.cnf
sudo port unload mysql5-server
sudo port load mysql5-server

This kind of usage question would be better asked on the MacPorts User mailing list or a MySQL forum.

comment:2 Changed 13 years ago by IlushinDNS@…

Thanks!

Sorry for stupid questions on serious site...

comment:3 Changed 13 years ago by ryandesign (Ryan Carsten Schmidt)

Port: mysql5-server added
Resolution: invalid
Status: newclosed
Type: requestdefect
Note: See TracTickets for help on using tickets.