Results 1 to 8 of 8
  1. #1

    Question Installing MySQL


    I am trying to install MySQL on Fedora Core 4. When I use the RPM to install it, I don't get the MySQL command line or mysqladmin. So I try yum install mysql-server and it installs it but again I don't have the command line or mysqladmin and also when trying to start MySQL I get:

    mysql: unrecognized service

    Please help!


  2. #2
    Join Date
    Mar 2003
    California USA

    are the rpms you need

    service mysqld start

    try that.
    Steven Ciaburri | Proactive Linux Server Management -
    Managed Servers (AS62710), Server Management, and Security Auditing.

  3. #3
    Join Date
    Dec 2004
    Starting mysql like that is bad...bad..bad.

    Here's the correct way:

    >> bin/mysqld_safe --user=mysql &

    It has been my experience that sometimes a RPM install does not build the grant tables properly to begin with..if this is so:

    >>bin/mysql_install_db --user=mysql

    THat is, of course..if the script is in /bin

    You'll want to set a root Mysql password as well as make a decision on what to do about the default anon access accounts.

    I prefer to delete them altogether myself.

    Make sure everything is installed properly:

    > bin/mysqladmin version

    Verify you can shut down the server:

    > bin mysqladmin -u root shutdown

    Anonymous account removal:

    shell > mysql -u root
    mysql > DELETE FROM mysql.user WHERE User = '';

    Set a root password:

    shell > mysql -u root
    mysql> SET PASSWORD FOR 'root'@'localhost' = PASSWORD('putpasshere');
    mysql> SET PASSWORD FOR 'root'@'putyourhostnamehere'=PASSWORD('newpass');

    All of these (and a lot more) is in their terribly spammy but informative to download (I advise get both html and pdf..html is easier to view but pdf is easier to print)

    Bryon L Harvey
    Soil Relocation Engineer

  4. #4

    Ok I installed it but I messed up! I removed it using yum but I can't install it using RPM again. It just says:

    package MySQL-server-4.1.21-0.glibc23 is already installed

    How can I fix this?

    Thanks for all the help!


  5. #5
    Join Date
    May 2006
    Coimbra, Portugal
    You can do 'rpm -e MySQL-server-4.1.21-0.glibc23' and do it from the beggining

  6. #6
    Thanks but when trying to set a root password I get:

    # /usr/bin/mysqladmin -u root password '-removed-'
    /usr/bin/mysqladmin: connect to server at 'localhost' failed
    error: 'Access denied for user 'root'@'localhost' (using password: NO)'

    My attempt to (re)set root password:

    I started MySQL with:

    # safe_mysqld --skip-grant-tables
    Starting mysqld daemon with databases from /var/lib/mysql

    Then I ran:

    # mysqladmin -u root flush-privileges password "-removed-"
    mysqladmin: unable to change password; error: 'Can't find any matching row in the user table'

    I did not work though Please help.
    Last edited by Tomdarkness; 09-19-2006 at 04:02 PM.

  7. #7
    Ok I managed to sort out the root user problem - When I was uninstalling MySQL it did not delete the mysql directory so I still had the old "messed up" mysql tables. Fixed the problem by manually deleteing them and installing again.

  8. #8
    Join Date
    Dec 2004
    So everything works now?

    You can also delete the test database if you's considered a security risk as well. Almost any default thing like that carries with it risks.

    I don't install Mysql via RPMS at all...or anything serious..webservers...mail servers...php..perl..python..etc. Mysql...for the best performance...I recommend people downloading binaries from Mysql directly...if you have Intel all the binaries created with the Intel compilers.

    As for PHP, Perl and Apache...and other to do the good ole compile from source...because they are connected...and no rpm can account for that. I've just begun to get serious with the apache/mysql/python/perl/etc the only thing I can recommend is download the source packages and dive in. If you had to start with one...I'd say PHP...because PHP will give you pointers on what you need...say...for apache and mysql connectivity.

    The best bet is to download the source packages...then..give the config script a command to show all so...

    ./configure --help

    I'll share more when I know more!

    As always!

    Last edited by bryonhost1; 09-19-2006 at 04:49 PM.
    Bryon L Harvey
    Soil Relocation Engineer

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts