Chris Gough wrote:
>
> Christian Mack wrote:
>
> > Chris Gough wrote:
> > >
> > > mysql was running fine for about a month, but then i started using it. I
> > > added some users, created some databases, and even populated some
> > > tables. Then (using phpMyAdmin) i tried to "reload mysql". mysqld
> > > dissapeared, and the situation i found myself in after that is confusing
> > > me.
> > >
> > > /usr/local/mysql/bin/mysqld
> > > gives me the error "cant change to /usr/local/mysql/var (Errcode: 2)
> > > aborting
> > > not surprising, there is no such directory
> > >
> > > /usr/local/mysql/bin/safe_mysql
> > > gave me "cant find /usr/local/mysql/libexec/mysqld"
> > > and again, neither could i
> > >
> > > then i discovered:
> > > /usr/sbin/mysqld
> > > it seemed to work, and i could connect to the server with:
> > > /usr/bin/mysql
> > > but not /usr/local/mysql/bin/mysql (or safe_mysql).
> > >
> > > Can anyone tell me what i have done, where i am going wrong.
> > >
> > > chris
> >
> > Hi Chris
> >
> > Seems you have changed your setting of "--basdir".
> >
> > Have you changed or moved the /etc/my.cnf file?
> >
> > What does this command give you?
> > root # mysqld -? |grep :
> >
> > Tschau
> > Christian
>
> /usr/sbin/mysqld -? | grep :
> gave...
< ... >
> basedir: /
> datadir: /var/lib/mysql/
> tmpdir: /tmp/
> language: /usr/share/mysql/english
> pid file: /var/lib/mysql/tech9.pid
> TCP port: 3306
> Unix socket: /var/lib/mysql/mysql.sock
< ... >
> /usr/local/mysql/bin/mysqld -? | grep :
> gave similar, except
> basedir: /usr/local/mysql-3.22.25-pc-linux-gnu-i686/
> datadir: /usr/local/mysql-3.22.25-pc-linux-gnu-i686/var/
> language: /usr/local/mysql-3.22.25-pc-linux-gnu-i686/share/mysql/english/
> pid file: /usr/local/mysql-3.22.25-pc-linux-gnu-i686/var/tech9.pid
>
> yes, i did use the binary distribution (g++ error on source, easy solution).
> ln /usr/local/mysql -> /usr/local/mysql-3.22.25-pc-linux-gnu-i686
>
> Thankyou, this looks very promising. I still don't understand why I have 2
> different mysqld's. I assume the tables i made before are in the /usr/local/..
> location, because i can't find them when i start the /usr/sbin/mysqld. If that
> is so, how did i manage to start /usr/local/../mysqld?
>
> chris
Hi Chris
Sorry for the late answer, I was really busy.
To start the mysqld in /usr/local/... you have to cd to /usr/local/mysql/, and then start
mysql via the safe_mysqld script.
You also could create an /etc/my.cnf file and set the datadir like this:
--- /etc/my.cnf -------
....
[mysqld]
datadir = /usr/local/mysql/data/
...
------------------------
/usr/sbin/mysqld is normally used for automatically starting mysql DBMS on system startup.
/usr/local/mysql..../bin/mysqld is normally used for testing a new mysql DBMS before
generally using it.
Tschau
Christian