Mysql installation
started by: galmichegalmiche
on: 1192532250|%e %b %Y, %H:%M %Z|agohover
number of posts: 31
rss icon RSS: new posts
summary:
about installing Mysql
Mysql installation
galmichegalmiche 1192532250|%e %b %Y, %H:%M %Z|agohover

Hi all,

I have followed the hacks to install mysql (see bellow):
the last line is "make testdir=/tmp/mysql".

Question: Isn't any 'make install' to do after that? What is really done, only compiling or any install in some directories?

Thx for help.

"
cd /opt
wget http://downloads.mysql.com/archives/mysql-5.0/mysql-5.0.21.tar.gz
tar xfz mysql-5.0.21.tar.gz
mv mysql-5.0.21.tar.gz src
cd mysql-5.0.21
addgroup -g 40 mysql
adduser -G mysql -H mysql
C_EXTRA_FLAGS=-fno-strict-aliasing ./configure —prefix=/usr —sysconfdir=/etc —libexecdir=/usr/sbin —localstatedir=/srv/mysql —enable-thread-safe-client —enable-assembler —enable-local-infile —with-unix-socket-path=/var/run/mysql/mysql.sock —without-debug —without-bench —with-readline —with-berkeley-db —with-extra-charsets=all

make testdir=/tmp/mysql [takes 18 hours]
"

unfold Mysql installation by galmichegalmiche, 1192532250|%e %b %Y, %H:%M %Z|agohover
Re: Mysql installation
tcblacktcblack 1192551531|%e %b %Y, %H:%M %Z|agohover

As you noted the directions on Mysql need some tweaking.
Yes you need to perform a make install.
You really need to spend some time reading the mysql installation documentation. Pay attention to the Unix issues, including the post-install and security issues.

There are some rather unique situations which popped up during my install, unfortunately I did not record them all for posterity. I do know that I now have a working Mysql, PHP, PHPMyadmin configuration. Be mindful that the small processor on the mybook soars to 99.8% (top session) during every mysql request. I'm using it as a playground for different CMS ideas I have but i expect every request to cause a slow down.

You'll need to do at least some (if not all) of the following as root:

Make install 
cp support-files/my-medium.cnf /etc/my.cnf
vi /etc/my.conf #make any changes you need to make and save the file using <escape> :wq

When you try to start the mysql server it will complain about missing libraries so do the following to fix that.
(this will open the file ld.so.conf which is where library locations are identified.
The double arrow "»" means write to the end of the file
)

cat >>/etc/ld.so.conf<<EOF    
/usr/lib/mysql
EOF
ldconfig -v

Now it's time to prepare the installation directory to be owned by the mysql user and group which you created earlier using addgroup -g 40 mysql and
adduser -G mysql -H mysql

cd /usr/share/mysql # this is the installation directory of mysql
chown -R mysql .   #Changes ownership from root to user mysql
chgrp -R mysql .   # ditto for group ownership
/usr/bin/mysql_install_db --user=mysql  # this will install the mysql data directory and initialize the grant tables.
chown -R root .
chown -R mysql var

There are some security concerns before you really get going too. This is from the docs:(read the manual, manual good!)

After installing MySQL, there are some issues that you should address.
…On all platforms, an important security concern is that the initial accounts in the grant tables have no passwords.
You should assign passwords to prevent unauthorized access to the MySQL server.
Optionally, you can create time zone tables to enable recognition of named time zones.

Take some time to read some of the post install documentation. Be mindful of course that the directories and file locations you see in the docs might be different from what you're seeing in your MBWE.
Especially vital is a section on Securing the Initial MySQL Accounts <= Read This!

When you're all set, start the server:

mysqld_safe --user=mysql &

If you want it to autostart when you boot:

cp /usr/share/mysql/mysql.server /etc/init.d/
last edited on 1192551652|%e %b %Y, %H:%M %Z|agohover by tcblack + show more
unfold Re: Mysql installation by tcblacktcblack, 1192551531|%e %b %Y, %H:%M %Z|agohover
Re: Mysql installation
galmichegalmiche 1192636542|%e %b %Y, %H:%M %Z|agohover

Thanks work perfectly.
I will open a new post on how to install phpmyadmin
I got error after creating the config.inc.php file and running phpmysql , as it says that
"php can not load mysql extension"

I should have forget either to install something or parameters with php.

Thx
Hervé

unfold Re: Mysql installation by galmichegalmiche, 1192636542|%e %b %Y, %H:%M %Z|agohover
Re: Mysql installation
laterringlaterring 1192653319|%e %b %Y, %H:%M %Z|agohover

"php can not load mysql extension"

I should have forget either to install something or parameters with php.

do you have edited your php.ini to add or uncomment

extension=mysql.so (take out the ';')

unfold Re: Mysql installation by laterringlaterring, 1192653319|%e %b %Y, %H:%M %Z|agohover
Re: Mysql installation
galmichegalmiche 1192694013|%e %b %Y, %H:%M %Z|agohover

First,
I will have to add parameters —with-mysqli=/usr/bin/mysql_config —with- to the .configure of php:

./configure —without-iconv —without-pear —enable-fastcgi —enable-discard-path —with-mysqli=/usr/bin/mysql_config —with-mysql

I am doing compilation right now, but I will also have to add extension=mysql.so to php.ini

Thx
Hervé

unfold Re: Mysql installation by galmichegalmiche, 1192694013|%e %b %Y, %H:%M %Z|agohover
Re: Mysql installation
galmichegalmiche 1192701243|%e %b %Y, %H:%M %Z|agohover

Hi,

It is a problem:
I uncommented this line:
extension=mysql.so
but restarting lighttpd says that it can not fine mysql.so
I tried msql.so , same not found.

I followed the process of compiling mysql in this wiki
ending with the classic make install
but, where is located mysql.so and where should I copy it so lighttpd can find it?

FYI my libs are in /usr/lib/mysql, but no mysql.so nor msql.so file.

Thx
Hervé

last edited on 1192704557|%e %b %Y, %H:%M %Z|agohover by galmiche + show more
unfold Re: Mysql installation by galmichegalmiche, 1192701243|%e %b %Y, %H:%M %Z|agohover
Re: Mysql installation
tcblacktcblack 1192726801|%e %b %Y, %H:%M %Z|agohover

it may rather be an issue that mysql is not running. It takes some resources to run so it doesn't always start successfully. (I'm working on that).
as root execute

/etc/init.d/mysql.server status

and see what it's doing. If it's not running

/etc/init.d/mysql.server start
unfold Re: Mysql installation by tcblacktcblack, 1192726801|%e %b %Y, %H:%M %Z|agohover
Re: Mysql installation
galmichegalmiche 1192733396|%e %b %Y, %H:%M %Z|agohover

/etc/init.d/mysql.server status doesn't work as command line;
it returns: Usage: /etc/init.d/mysql.server start|stop|restart|reload

but i used:
[root@MyBookWorld galmiche]# mysqladmin -u root -p status
Enter password:
Uptime: 33900 Threads: 1 Questions: 4 Slow query

So the server is up.

In my /usr/local/lib/php.ini, I have: extension_dir = "./" , but no link, nor library msql.so in this path relative to php.ini position .

The problem occurs when I run /etc/init.d/lighttpd.sh start .
If I enable the line extension=mysql.so in /usr/local/lib/php.ini then I get:

PHP Warning: PHP startup: Unable to load dynamic library './mysql.so' - File not found in unknow on line 0

same occurs if I replace mysql.so with msql.so ; none are found by the server at startup.

I use php-5.2.3 and mysql 5.0.21

Where are located mysql.so or msql.so and who generates it ( mysql compilation or php compilation) ?
Or did I mad a mistake by uncommenting extension=mysql.so in php.ini, and it would mean mysql is not an external library of php, but included during php compiling?

Thx
Hervé

last edited on 1192736406|%e %b %Y, %H:%M %Z|agohover by galmiche + show more
unfold Re: Mysql installation by galmichegalmiche, 1192733396|%e %b %Y, %H:%M %Z|agohover
Re: Mysql installation
tcblacktcblack 1192805164|%e %b %Y, %H:%M %Z|agohover

the mysql.so file does not exist on my worldbook. Yes I think you made a mistake by uncommenting it.
if you will reconfigure/install PHP with the mysql extensions and reboot that might/should fix your problem.

unfold Re: Mysql installation by tcblacktcblack, 1192805164|%e %b %Y, %H:%M %Z|agohover
Re: Mysql installation
DarkWanDarkWan 1214775936|%e %b %Y, %H:%M %Z|agohover

Try to install php-mysql support:
ipkg install php-mysql
mysql.so will be installed into extensions dir and auto configured
I hope this will be useful

last edited on 1214854529|%e %b %Y, %H:%M %Z|agohover by DarkWan + show more
unfold Re: Mysql installation by DarkWanDarkWan, 1214775936|%e %b %Y, %H:%M %Z|agohover
Re: Mysql installation
natsuconatsuco 1200238255|%e %b %Y, %H:%M %Z|agohover

hi,

can you give me the good command C_EXTRA_FLAGS … i can copy past on my terminal,

Thanks you,

unfold Re: Mysql installation by natsuconatsuco, 1200238255|%e %b %Y, %H:%M %Z|agohover
Re: Mysql installation
natsuconatsuco 1192702128|%e %b %Y, %H:%M %Z|agohover

Hi, after this action i lost my ssh connection and now, i can't reach ssh since 2 day. I have already change my url link, so right now, i can't retreive my ssh ! Please can you help me ?

unfold Re: Mysql installation by natsuconatsuco, 1192702128|%e %b %Y, %H:%M %Z|agohover
Re: Mysql installation
galmichegalmiche 1192704496|%e %b %Y, %H:%M %Z|agohover

Hello,
Have you tryed
http://martin.hinner.info/mybook/sshaccess.php
to re enable the ssh by default?
Sincerelly
Hervé

unfold Re: Mysql installation by galmichegalmiche, 1192704496|%e %b %Y, %H:%M %Z|agohover
Re: Mysql installation
natsuconatsuco 1192711076|%e %b %Y, %H:%M %Z|agohover

Yes i do and it's worked. But i have activate php on my mybook webserver so right now i haven't mybook original portal. Have an new idea ?

unfold Re: Mysql installation by natsuconatsuco, 1192711076|%e %b %Y, %H:%M %Z|agohover
Re: Mysql installation
galmichegalmiche 1192716205|%e %b %Y, %H:%M %Z|agohover

Do you browser http://<mybook> or http://<mybook>:port with port!=80 ?
My self , installing php did not changed anything on lighttpd server.
sorry..no idea.

last edited on 1192716514|%e %b %Y, %H:%M %Z|agohover by galmiche + show more
unfold Re: Mysql installation by galmichegalmiche, 1192716205|%e %b %Y, %H:%M %Z|agohover
Re: Mysql installation
tcblacktcblack 1192805283|%e %b %Y, %H:%M %Z|agohover

try http://<mybook>/auth/home.pl

unfold Re: Mysql installation by tcblacktcblack, 1192805283|%e %b %Y, %H:%M %Z|agohover
Re: Mysql installation
natsuconatsuco 1192815436|%e %b %Y, %H:%M %Z|agohover

I thx all for your help. I just make a chown -R root:root /var/empty and sudo /usr/sbin/sshd -f /etc/sshd_config and remove my old known_hosts file i just hope it will work a long time.

unfold Re: Mysql installation by natsuconatsuco, 1192815436|%e %b %Y, %H:%M %Z|agohover
Re: Mysql installation
natsuconatsuco 1192970014|%e %b %Y, %H:%M %Z|agohover

Hi after type the command : /usr/bin/mysql_install_db —user=mysql

cannot create directory `/srv/mysql': No such file or directory
cannot access `/srv/mysql': No such file or directory
cannot create directory `/srv/mysql/mysql': No such file or directory
cannot access `/srv/mysql/mysql': No such file or directory
cannot create directory `/srv/mysql/test': No such file or directory
cannot access `/srv/mysql/test': No such file or directory
cannot access `/srv/mysql': No such file or directory
cannot access `/srv/mysql/mysql': No such file or directory
cannot access `/srv/mysql/test': No such file or directory
Installing all prepared tables
071021  6:50:54 [Warning] Can't create test file /srv/mysql/MyBookWorld.lower-test
/usr/sbin/mysqld: Can't change dir to '/srv/mysql/' (Errcode: 2)
071021  6:50:54 [ERROR] Aborting

071021  6:50:54 [Note] /usr/sbin/mysqld: Shutdown complete

Installation of system tables failed!

Examine the logs in /srv/mysql for more information.
You can also try to start the mysqld daemon with:
/usr/sbin/mysqld --skip-grant &
You can use the command line tool
/usr/bin/mysql to connect to the mysql
database and look at the grant tables:

shell> /usr/bin/mysql -u root mysql
mysql> show tables

Try 'mysqld --help' if you have problems with paths. Using --log
gives you a log in /srv/mysql that may be helpful.

The latest information about MySQL is available on the web at
http://www.mysql.com
Please consult the MySQL manual section: 'Problems running mysql_install_db',
and the manual section that describes problems on your OS.
Another information source is the MySQL email archive.
Please check all of the above before mailing us!
And if you do mail us, you MUST use the /usr/bin/mysqlbug script!

I need your help, thx…

unfold Re: Mysql installation by natsuconatsuco, 1192970014|%e %b %Y, %H:%M %Z|agohover
Re: Mysql installation
tcblacktcblack 1193087077|%e %b %Y, %H:%M %Z|agohover

it looks like you need to create the srv directory as root.
best check to make sure that it's not there before you try to create it.

mkdir /srv
unfold Re: Mysql installation by tcblacktcblack, 1193087077|%e %b %Y, %H:%M %Z|agohover
Re: Mysql installation
galmichegalmiche 1193088720|%e %b %Y, %H:%M %Z|agohover

Hi,

I confirm to you that I too have had to create as root the directory: /srv
This one didn't exist with original mybook tree.
( I also created /srv/mysql, but I think mysql creates itself. To be tested)/

Sincerelly
Hervé

unfold Re: Mysql installation by galmichegalmiche, 1193088720|%e %b %Y, %H:%M %Z|agohover
Re: Mysql installation
natsuconatsuco 1193340862|%e %b %Y, %H:%M %Z|agohover

hi all, thanks for your help … i have a new pb !

for all mysql command :

error: 'Can't connect to local MySQL server through socket '/var/run/mysql/mysql.sock' (111)'
Check that mysqld is running and that the socket: '/var/run/mysql/mysql.sock' exists!

thanks

unfold Re: Mysql installation by natsuconatsuco, 1193340862|%e %b %Y, %H:%M %Z|agohover
Re: Mysql installation
tcblacktcblack 1193407935|%e %b %Y, %H:%M %Z|agohover

The socket is created when Mysqld is running. When the daemon isn't running, the socket isn't there. The message means precisely what it says.

/etc/init.d/mysql.server start

will fix the problem until the next reboot.

If you want mysql to start, than you need to recognize that WDMBWE is designed to start only those scripts starting with S in the init.d directory. So you can simply create a symlink in the directory in order to cause an autostart.

ln -s /etc/init.d/mysqlserver /etc/init.d/S40mysqlserver
unfold Re: Mysql installation by tcblacktcblack, 1193407935|%e %b %Y, %H:%M %Z|agohover
Re: Mysql installation
OutrageouS90OutrageouS90 1197928978|%e %b %Y, %H:%M %Z|agohover

Starting mysqld daemon with databases from /srv/mysql
STOPPING server from pid file /srv/mysql/WD.pid
071210 04:35:26 mysqld ended

What is it??

unfold Re: Mysql installation by OutrageouS90OutrageouS90, 1197928978|%e %b %Y, %H:%M %Z|agohover
Re: Mysql installation
edgecrush3redgecrush3r 1197975824|%e %b %Y, %H:%M %Z|agohover

Could be all sorts of things.. please check the log files.

unfold Re: Mysql installation by edgecrush3redgecrush3r, 1197975824|%e %b %Y, %H:%M %Z|agohover
Re: Mysql installation
OutrageouS90OutrageouS90 1198007034|%e %b %Y, %H:%M %Z|agohover

[root@WD mysql]# chown -R mysql var
cannot access ‘var’: No such file or directory

unfold Re: Mysql installation by OutrageouS90OutrageouS90, 1198007034|%e %b %Y, %H:%M %Z|agohover
Re: Mysql installation
OutrageouS90OutrageouS90 1198007434|%e %b %Y, %H:%M %Z|agohover

How can i add usernames?

unfold Re: Mysql installation by OutrageouS90OutrageouS90, 1198007434|%e %b %Y, %H:%M %Z|agohover
Re: Mysql installation
OutrageouS90OutrageouS90 1198012770|%e %b %Y, %H:%M %Z|agohover

does any1 can tell me how should i edit my.cnf

There are lot of filings.. What shuld i do. PLEASE HELP!!

unfold Re: Mysql installation by OutrageouS90OutrageouS90, 1198012770|%e %b %Y, %H:%M %Z|agohover
Re: Mysql installation
edgecrush3redgecrush3r 1198078468|%e %b %Y, %H:%M %Z|agohover

It realy shouldnt be that difficult, and pretty much same on any machine. (so also a bit off topic.. else i could start a PHP column on this forum, and would be as helpfull :P)..
In general.. just change the lines you feel like changing. Or just leave default :P
http://www.mysql.org/

last edited on 1198078561|%e %b %Y, %H:%M %Z|agohover by edgecrush3r + show more
unfold Re: Mysql installation by edgecrush3redgecrush3r, 1198078468|%e %b %Y, %H:%M %Z|agohover
Re: Mysql installation
OutrageouS90OutrageouS90 1197742977|%e %b %Y, %H:%M %Z|agohover

testdir the 18 hour process is needed certain? What going to happen when i dont do that test?

last edited on 1197765746|%e %b %Y, %H:%M %Z|agohover by OutrageouS90 + show more
unfold Re: Mysql installation by OutrageouS90OutrageouS90, 1197742977|%e %b %Y, %H:%M %Z|agohover
Re: Mysql installation
edgecrush3redgecrush3r 1198078892|%e %b %Y, %H:%M %Z|agohover

[root@WD mysql]# chown -R mysql var
cannot access ‘var’: No such file or directory

the var directory is located in the root folder so try:
chown -R mysql /var

unfold Re: Mysql installation by edgecrush3redgecrush3r, 1198078892|%e %b %Y, %H:%M %Z|agohover
Re: Mysql installation
pjeterinfopjeterinfo 1200499948|%e %b %Y, %H:%M %Z|agohover

Installed Mysql succesfull, but I need the php extension mysql.so to work in order to use CMS packages(JOOMLA) and phpmyadmin. This is not possible I think.
Currently my mybook is running JIMBO cms which is allso works with sqlite and flat dbs.
Performance is very bad as php-cgi uses 90% recources. It try to fine tune the performance but I think this will be it.

Enabled swat on MyBook World binariesare.mine.nu

last edited on 1200670110|%e %b %Y, %H:%M %Z|agohover by pjeterinfo + show more
unfold Re: Mysql installation by pjeterinfopjeterinfo, 1200499948|%e %b %Y, %H:%M %Z|agohover
new post
Unless stated otherwise Content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License