# [Solved]mysqlinitscripts & mysql&php

## archibald haddock

Hi,

I am trying to install Ampache on my Computer. I runned emerge -aq ampache and it stucked while configuring php. *Quote:*   

> checking for MySQL support... yes
> 
> checking for specified location of the MySQL UNIX socket... /var/run/mysqld/mysqld.sock
> 
> checking for MySQL UNIX socket location... /var/run/mysqld/mysqld.sock
> ...

 

I looked for the libmysqlclient and they are indeed not in /usr, they are in /usr/lib. I thought there could be some configuration errors, so I read the Mysql Guide. My output from the emerge --configure was a bit different but I stucked really at   *Quote:*   

> sal ~ # /etc/init.d/mysql start        
> 
> start:5: bad substitution
> 
>  * ERROR: mysql failed to start

  Sometime complaining also about "122: /etc/init.d/mysqlmanager error near ()"

Emerge --info

 *Quote:*   

> sal ~ # emerge --info          
> 
> Portage 2.1.7.16 (default/linux/x86/10.0/desktop, gcc-4.1.2, glibc-2.10.1-r0, 2.6.33-rc2 i686)
> 
> =================================================================
> ...

 

Can anyone help me?Last edited by archibald haddock on Thu Dec 31, 2009 6:14 pm; edited 1 time in total

----------

## msalerno

Do you use mysql for anything else?  Is there a mysql process running?  Did you try re-emerging mysql?

emerge -av dev-db/mysql dev-db/mysql-init-scripts

Looks like your mysql is hosed. Try rebuilding it and then let me know how it works out.

----------

## archibald haddock

I think Mysql was first pulled an, as I emerged amarok and so with embedded flag.

I tried reinstalling, changed nothing, reinstalling with USE="-*", again nothing.

 *Quote:*   

> sal ~ #  /etc/init.d/mysql start                                    
> 
>  * Caching service dependencies ...
> 
> /etc/init.d/mysqlmanager:122: parse error near `()'                      [ ok ]
> ...

 

And the same php error

----------

## msalerno

First you need to fix the mysql issue, then worry about php.

When you re-emerged mysql there were no errors reported?

emerge -av dev-db/mysql dev-db/mysql-init-scripts

What's the output of: emerge -pv dev-db/mysql dev-db/mysql-init-scripts

----------

## archibald haddock

Build end from emerge -av dev-db/mysql dev-deb/mysql-init-scripts:

 *Quote:*   

> --- replaced obj /usr/bin/msql2mysql
> 
> --- replaced obj /usr/bin/innochecksum
> 
> --- replaced obj /usr/bin/comp_err
> ...

 

emerge -pv dev-db/mysql dev-db/mysql-init-scripts:

 *Quote:*   

> sal ~ # emerge -pv dev-db/mysql dev-db/mysql-init-scripts                                                          
> 
> These are the packages that would be merged, in order:
> 
> Calculating dependencies... done!
> ...

 

----------

## msalerno

And mysql is still not working?

Is this a new install? If so, did you run: emerge --config =dev-db/mysql-5.0.84-r1 ?

Once I get into the office I'll post the output of my mysql use flags to compare.

----------

## archibald haddock

It was a fresh install and I executed the --configure. Strange thing is that, if I just execute /usr/sbin/mysqld the server works and I can connect to.

----------

## msalerno

 *Quote:*   

> [ebuild   R   ] dev-db/mysql-init-scripts-1.2  0 kB
> 
> [ebuild   R   ] dev-db/mysql-5.0.84-r1  USE="berkdb community perl ssl -big-tables -cluster -debug -embedded -extraengine -latin1 -max-idx-128 -minimal -profiling (-selinux) -static" 0 kB

 

 *Quote:*   

> equery belongs /etc/init.d/mysql
> 
> ...
> 
> dev-db/mysql-init-scripts-1.2 (/etc/init.d/mysql)
> ...

 

----------

## archibald haddock

Thank you for your help, but I finally found the error.

start:5: bad substitution lead my on the right trail. It was bashisms fault. After I changed /bin/sh -> /bin/zsh to /bin/bash the mysqlinitscripts worked and the php install (I have no clue why the install depends on /bin/bash as /bin/sh).

----------

## msalerno

You might want to file a bug for this one.

----------

## archibald haddock

Did so yet.

----------

