Re: mySQL 5.4 server Post installation SNAFUs
jaymax wrote: Post installation SNAFUS [i] support-files/mysql.server are apparently in /usr/local/share/mysql am I correct, all of them? Yes, except that mysql-server is the rc.subr(8) script to start up mysql on boot, and that is to be found in /usr/local/etc/rc.d/mysql-server [ii] mysql_secure_installation is not found in this installation, it is in v. 5.5 however. It's part of a different port. You need to install databases/mysql54-scripts The same applies to mysql55 actually -- you must have somehow already installed databases/mysql55-scripts in that case. [iii] Start restricted to /usr/local/bin/mysqld_safe apparently since mysql_secure_installation is not available [iv] /usr/local/bin/mysqladmin -u root password == ax# /usr/local/bin/mysqladmin -u root password '' /usr/local/bin/mysqladmin: connect to server at 'localhost' failed error: 'Access denied for user 'root'@'localhost' (using password: NO)' ax# /usr/local/bin/mysqladmin -u root -h ax.lall.com password /usr/local/bin/mysqladmin: connect to server at 'ax.lall.com' failed error: 'Access denied for user 'root'@'ax.lall.com' (using password: NO)' HOW can I setup root password ? If you're currently logged into ax.lall.com, then you definitely want to use '-h localhost' (or nothing, as that's the default). If there is already a root password, obviously you need to give it. Conversely, if you've got a password set in /root/.my.cnf or some other my.cnf file but this is a brand new mysql install with no root password yet, then you need to temporarily move that file aside: mysql doesn't let you in if you try and supply a password for a no-password account. I advise using mysql_secure_installation -- but you're still going to have to move aside any pre-existing .my.cnf files. Also, as a general security thing, preferably don't allow root logins to mysql from anywhere other than localhost. Cheers, Matthew -- Dr Matthew J Seaman MA, D.Phil. 7 Priory Courtyard Flat 3 PGP: http://www.infracaninophile.co.uk/pgpkey Ramsgate Kent, CT11 9PW signature.asc Description: OpenPGP digital signature
Re: mySQL 5.4 server Post installation SNAFUs
OK Thanks again, still having problems with setting the root password. There is no my.cnf file Matthew Seaman-2 wrote: jaymax wrote: Post installation SNAFUS [iv] /usr/local/bin/mysqladmin -u root password == ax# /usr/local/bin/mysqladmin -u root password '' /usr/local/bin/mysqladmin: connect to server at 'localhost' failed error: 'Access denied for user 'root'@'localhost' (using password: NO)' ax# /usr/local/bin/mysqladmin -u root -h ax.lall.com password /usr/local/bin/mysqladmin: connect to server at 'ax.lall.com' failed error: 'Access denied for user 'root'@'ax.lall.com' (using password: NO)' HOW can I setup root password ? If you're currently logged into ax.lall.com, then you definitely want to use '-h localhost' (or nothing, as that's the default). If there is already a root password, obviously you need to give it. Conversely, if you've got a password set in /root/.my.cnf or some other my.cnf file but this is a brand new mysql install with no root password yet, then you need to temporarily move that file aside: mysql doesn't let you in if you try and supply a password for a no-password account. I advise using mysql_secure_installation -- but you're still going to have to move aside any pre-existing .my.cnf files. Also, as a general security thing, preferably don't allow root logins to mysql from anywhere other than localhost. There was a v 6.2 install attempt but had to be rolled back. All files were removed 'hopefully'. Version 5.5 was downloaded to a src directory but not installed. A find -f /* -name 'my.cnf' -print search found nothing except copies in the src directory of v 5.5 and those in the ports. When the server is started with /usr/local/bin/mysqld_safe I get the same responses as above re: setting the root password attempt /usr/local/bin/mysqladmin -u root -h localhost password /usr/local/bin/mysqladmin: connect to server at 'localhost' failed error: 'Access denied for user 'root'@'localhost' (using password: NO)' When I attempt with a /usr/local/bin/mysql_secure_installation start (after killing the mysql safe start) I get the following == 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): ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2) Enter current password for root (enter for none): ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2) Enter current password for root (enter for none): So I obviously have the wrong approach, please advise. Thanks! -- View this message in context: http://old.nabble.com/mySQL-5.4-server---Post-installation-SNAFUs-tp27086064p27089065.html Sent from the freebsd-questions mailing list archive at Nabble.com. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
mySQL 5.4 server Post installation SNAFUs
Installed mysql-server54 from the ports 7.2-RELEASE FreeBSD 7.2-RELEASE #0: O/S running Apache/2.2.11 (FreeBSD) installed PHP 5.2.12 configure options used == make pager=more prompt=mysql54 socket=/usr/tmp/mysql.sock localstatedir=/disk02/db/mysql/DATA with_linuxthreads=yes with_ssl=yes install clean Final output == { ..?[n] ; problems, questions and answers sought } ax# /usr/local/bin/mysql_install_db Installing MySQL system tables... 091230 13:35:02 [ERROR] The update log is no longer supported by MySQL in version 5.0 and above. It is replaced by the binary log. 091230 13:35:02 [Note] Falcon: unable to open system data files. 091230 13:35:02 [Note] Falcon: creating new system data files. 091230 13:35:03 [Warning] Forcing shutdown of 2 plugins OK Filling help tables... 091230 13:35:04 [ERROR] The update log is no longer supported by MySQL in version 5.0 and above. It is replaced by the binary log. 091230 13:35:05 [Warning] Forcing shutdown of 2 plugins OK To start mysqld at boot time you have to copy support-files/mysql.server to the right place for your system ...?[i] PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER ! To do so, start the server, then issue the following commands: /usr/local/bin/mysqladmin -u root password 'new-password' /usr/local/bin/mysqladmin -u root -h ax.lall.com password 'new-password' Alternatively you can run: /usr/local/bin/mysql_secure_installation...?[ii] which will also give you the option of removing the test databases and anonymous user created by default. This is strongly recommended for production servers. See the manual for more instructions. You can start the MySQL daemon with: cd /usr/local ; /usr/local/bin/mysqld_safe ...?[iii] You can test the MySQL daemon with mysql-test-run.pl cd /usr/local/mysql-test ; perl mysql-test-run.pl Please report any problems with the /usr/local/bin/mysqlbug script! The latest information about MySQL is available at http://www.mysql.com/ Support MySQL by buying support/licenses from http://shop.mysql.com/ ___ Post installation SNAFUS [i] support-files/mysql.server are apparently in /usr/local/share/mysql am I correct, all of them? [ii] mysql_secure_installation is not found in this installation, it is in v. 5.5 however. [iii] Start restricted to /usr/local/bin/mysqld_safe apparently since mysql_secure_installation is not available [iv] /usr/local/bin/mysqladmin -u root password == ax# /usr/local/bin/mysqladmin -u root password '' /usr/local/bin/mysqladmin: connect to server at 'localhost' failed error: 'Access denied for user 'root'@'localhost' (using password: NO)' ax# /usr/local/bin/mysqladmin -u root -h ax.lall.com password /usr/local/bin/mysqladmin: connect to server at 'ax.lall.com' failed error: 'Access denied for user 'root'@'ax.lall.com' (using password: NO)' HOW can I setup root password ? -- View this message in context: http://old.nabble.com/mySQL-5.4-server---Post-installation-SNAFUs-tp27086064p27086064.html Sent from the freebsd-questions mailing list archive at Nabble.com. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org