problems installing mysql

I’m running openSUSE 11.0 on Lenovo 3000 N100. I’ve tried several ways to install mysql without success. There seem to be different problems each time I try something different but the bottom line is I can’t seem to get it to work.

I first spent a lot of time trying to get the QuickStart Install from the CD-ROM in Sams Teach Yourself PHP, MySQL and Apache to work. It had numerous problems but I eventually got all the permissions set to 777 and all the files owned by root. Then following the instructions in the book I needed to run the command
scripts/mysql_install_db --user=mysql
That command won’t hunt. So I tried adding the “.sh” at the end, since the relevant file seems to be scripts/mysql_install_db.sh. At that point, I got this reply,
linux-pczd:/usr/local # cd mysql-5.0.51a
linux-pczd:/usr/local/mysql-5.0.51a # scripts/mysql_install_db.sh -user=mysql
FATAL ERROR: Could not find @bindir@/my_print_defaults

If you are using a binary release, you must run this script from
within the directory the archive extracted into. If you compiled
MySQL yourself you must run ‘make install’ first.

Anyway, I gave up on this approach and tried installing using Yast. The install seemed to go fine, but now I can’t get it to start–it seems to start, to do something, and then quit.
linux-pczd:~ # mysqld_safe --user=mysql &
[1] 13739
linux-pczd:~ # nohup: ignoring input and redirecting stderr to stdout
Starting mysqld daemon with databases from /var/lib/mysql
STOPPING server from pid file /var/lib/mysql/linux-pczd.site.pid
090510 15:09:00 mysqld ended

Can anyone help?

Thanks.

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

MySQL should be about the easiest thing to get going; you’re just working
too hard. :wink:

So with a new install (or after cleaning out everything else you’ve done)
you should be able to add the ‘mysql’ package via Yast and then set it to
start on bootup:

sudo zypper in mysql #install
sudo /sbin/chkconfig mysql on

Once done if MySQL isn’t already running you can either reboot to start it
(lazy, but proves it will work on the next reboot) or start it manually:

sudo /etc/init.d/mysql status #see if it’s running
sudo /etc/init.d/mysql start #start it up

To verify it is working:

netstat -anp | grep :3306

and you should see a line stating it is listening like the following:

tcp 0 0 0.0.0.0:3306 0.0.0.0:* LISTEN 3647/mysqld-safe

Good luck.

SuseNeo wrote:
> I’m running openSUSE 11.0 on Lenovo 3000 N100. I’ve tried several ways
> to install mysql without success. There seem to be different problems
> each time I try something different but the bottom line is I can’t seem
> to get it to work.
>
> I first spent a lot of time trying to get the QuickStart Install from
> the CD-ROM in Sams Teach Yourself PHP, MySQL and Apache to work. It
> had numerous problems but I eventually got all the permissions set to
> 777 and all the files owned by root. Then following the instructions in
> the book I needed to run the command
> scripts/mysql_install_db --user=mysql
> That command won’t hunt. So I tried adding the “.sh” at the end, since
> the relevant file seems to be scripts/mysql_install_db.sh. At that
> point, I got this reply,
> linux-pczd:/usr/local # cd mysql-5.0.51a
> linux-pczd:/usr/local/mysql-5.0.51a # scripts/mysql_install_db.sh
> -user=mysql
> FATAL ERROR: Could not find @bindir@/my_print_defaults
>
> If you are using a binary release, you must run this script from
> within the directory the archive extracted into. If you compiled
> MySQL yourself you must run ‘make install’ first.
>
>
> Anyway, I gave up on this approach and tried installing using Yast. The
> install seemed to go fine, but now I can’t get it to start–it seems to
> start, to do something, and then quit.
> linux-pczd:~ # mysqld_safe --user=mysql &
> [1] 13739
> linux-pczd:~ # nohup: ignoring input and redirecting stderr to stdout
> Starting mysqld daemon with databases from /var/lib/mysql
> STOPPING server from pid file /var/lib/mysql/linux-pczd.site.pid
> 090510 15:09:00 mysqld ended
>
>
> Can anyone help?
>
> Thanks.
>
>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iQIcBAEBAgAGBQJKBymkAAoJEF+XTK08PnB5VhEQAMGibJdHyvPDhUF6VFs+QAwX
eOos3xwxhqdz1wGHUqG2+LyOKOsxVstjPLQs+2SDxpB0t6p6WmyszKYFluOFdbcm
JLc9rhXlRLhY9v0ZQ1x+KJcX1LJLCsGpr/C6kBXk8aGXw0M9ey8CKVQyhKXQZTcu
vPAHGjKuaVqeX/x2vzh2nFII8N5Q8e7JGAYmyC5xELZf1oMw2dKCH5ClTrM1O8WU
XvIdGSydEchxGkphdWspBhEXQVYNVqv3plPoDn+AQL6EFDvJ02oQtgL/OlrxL9o3
PauM4fqNCgxe3Z6xEP7ie7PAwqZjMeKl0/7u/GT7h2Uoq5WC9hgGwd82DRPtC0oQ
sSHinOlTIOOWscwLewrRblJUkjYtgF4lzFIPa8TwblOWxGKukBw/aSu+ZOoDSCzp
7+4o1Fn0kqEpa0glcyqwy/fOF4mx7HtnHDwEsWw+1LtFw9jR5iBcgLSNgw6jdCb2
MJeh5atIoIP1w4nPaPYuN6Og7qPA3wEt1VCKucH4dqOCTXNHpUMCWncKG6rgGTCs
4qMPDWFn84ff3c5PeFV3nZQAEY6BunZd2xFNrh3Hz0x2/uHa3ZezKFCIQaQlQxeN
tQpveEeWqeWISYHBNiNHHXBSetMRbD2Wl8HRCkTEWlQwf6EoB6pqPlN/45xJR3SS
ohB9m1oZvQ9edvjWci/M
=Efl/
-----END PGP SIGNATURE-----

Thanks. Sounds like it should be easy, but still some questions.

ab wrote:

So with a new install (or after cleaning out everything else you’ve done)
you should be able to add the ‘mysql’ package via Yast and then set it to
start on bootup:

sudo zypper in mysql #install
sudo /sbin/chkconfig mysql on

  1. “after cleaning out …”
    a. I used Yast to delete everything that a mysql search there shows as installed–except the openoffice reference.
    b. Then ran

find / -xdev -name “mysql”
=>

“/usr/lib/mysql” This seems empty. Can I leave it?
“/etc/apparmor.d/abstractions/mysql”: Do I need to make changes here?
“/etc/sysconfig/mysql”: Should I delete this file?
“/var/lib/mysql”: I deleted this directory.

Is there anywhere else that I need to worry about before re-installing?

  1. Do I use zypper as well as Yast? I thought that Yast did the install. (What is the # in “#install” for? I’m not familiar with that.)

  2. I had installed the following from Yast. Do I need anything else? The PHP and PHPadmin modules if I want to do LAMP?
    libmysqlclient15
    libmysqlclient_r15
    mysql
    mysql-administrator
    mysel-client
    mysql-gui-tools

Thanks again.

From where you are now I’m not sure this will work, but on every fresh install I do I install mysql, apache2 and php5 using Yast > Software > Manage Software

Ten in Yast > System > Runlevel Editor

Enable apache2 and mysql

Save.

Runs every time since 9.1.

I work with my php and html files in /home/logged in users/public_html

Works every time :slight_smile:

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

‘zypper’ is just another way and would not require you to do anything
except enter the command and enjoy the install.

A ‘#’ is a comment; I was commenting the commands inline.

Good luck.

SuseNeo wrote:
> Thanks. Sounds like it should be easy, but still some questions.
>
> ab wrote:
>> So with a new install (or after cleaning out everything else you’ve
>> done)
>> you should be able to add the ‘mysql’ package via Yast and then set it
>> to
>> start on bootup:
>>
>> sudo zypper in mysql #install
>> sudo /sbin/chkconfig mysql on
>
> 1. “after cleaning out …”
> a. I used Yast to delete everything that a mysql search there
> shows as installed–except the openoffice reference.
> b. Then ran > find / -xdev -name “mysql” =>
>
> “/usr/lib/mysql” This seems empty. Can I leave it?
> “/etc/apparmor.d/abstractions/mysql”: Do I need to make changes here?
> “/etc/sysconfig/mysql”: Should I delete this file?
> “/var/lib/mysql”: I deleted this directory.
>
> Is there anywhere else that I need to worry about before
> re-installing?
>
> 2. Do I use zypper as well as Yast? I thought that Yast did the
> install. (What is the # in “#install” for? I’m not familiar with that.)
>
> 3. I had installed the following from Yast. Do I need anything else?
> The PHP and PHPadmin modules if I want to do LAMP?
> libmysqlclient15
> libmysqlclient_r15
> mysql
> mysql-administrator
> mysel-client
> mysql-gui-tools
>
> Thanks again.
>
>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iQIcBAEBAgAGBQJKB4oBAAoJEF+XTK08PnB5Yl0P/Rc11NVI76/PUhant9HtcX49
6EvwlIROIuN4WM8hhzr+MZUdXHZ7KPqVPXtsq9iNbHvDiER+bCjj306JmSwFKuKb
h1hNOcjmJdm44oDfAcD18F0N6AmA2X0YOKIVbi1TNjaAgADnGDijoJwlWZ5lVgr8
m9E/2giaji7dQiLwv1N4rZ6TZk/pQQtb8rUDAgXwj4z2LdO/AueUINndOmTd8OHO
hlzvDax6AbECL1ikUOmiw470k/gb43T559S8jsKlSk13rhvWImEXMhffwdqJyyXe
KTldLpzbcL5pbQ11qlGYxxVa5NxgsH03JQfz2N1oWxHfaumARLevcDeziw9zyukp
Bo3lXWO/GsDM7U2FjtuveEqn74KJGNFXTnTkduWjXGzej5k5g5IoaIv252M9sEpR
+J24OSH7gJ4in+dO3WJFIYlp0ysxNsVk5YW7GLYfQWr7PfWEUSYLrmrPsX0xlQtV
QnNrmFIAdsja6kFvNLw91LCdCzG5NCjzaUn+lpkXLiezYSQkIVXPpX5E8SWO/JU6
gwscJx1BGVjapTkclWqkQYwo1ncSmf2jbHfpVxBb2cHi1s5RkSlKQlLP6Te5tOqV
MCasF1wyVTT2s821vQbeF9WoHsQdQqdSushLn6OaSCImpwo4eDG9HILu1L7nuAIW
0zMJl3UjzxRFS4/U+tjX
=hnhE
-----END PGP SIGNATURE-----

As ski_k2 described above, the best option is to install LAMP from software management. And then edit Runlevel for each bootup to start auto.
For phpmyadmin, i will give better option, is to use:
1- Mysql Administrator
2- Mysql Query Browser

You can install these from software management.
Best of luck.