PDA

Bekijk de volledige versie : not sticky: mysql



wpte
22-01-2008, 11:23
the sticky post up here in the forums, I dunno, but it's just not working for me.
I installed my router from the beginning with the "better" uclibc and ipkg, also, I'm already using root as user! I just did that because I really want mysql to work;)


[root@(none) root]$ ipkg install mysql
Installing mysql (4.1.20-2) to /opt/...
Downloading http://ipkg.nslu2-linux.org/feeds/optware/oleg/cross/stable/mysql_4.1.20-2_mipsel.ipk
Configuring mysql
Starting MySQL................................... ERROR!
Successfully terminated.
[root@(none) root]$ rm /opt/var/lib/mysql/mysql/*.*
[root@(none) root]$ rmdir /opt/var/lib/mysql/mysql
[root@(none) root]$ /opt/bin/mysql_install_db
WARNING: The host '(none)' could not be looked up with resolveip.
This probably means that your libc libraries are not 100 % compatible
with this binary MySQL version. The MySQL daemon, mysqld, should work
normally with the exception that host name resolving will not work.
This means that you should use IP addresses instead of hostnames
when specifying MySQL privileges !
Installing all prepared tables
Fill help tables

To start mysqld at boot time you have to copy support-files/mysql.server
to the right place for your system

PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !
To do so, start the server, then issue the following commands:
/opt/bin/mysqladmin -u root password 'new-password'
/opt/bin/mysqladmin -u root -h (none) password 'new-password'
See the manual for more instructions.

You can start the MySQL daemon with:
cd /opt ; /opt/bin/mysqld_safe &

You can test the MySQL daemon with the benchmarks in the 'sql-bench' directory:
cd sql-bench ; perl run-all-tests

Please report any problems with the /opt/bin/mysqlbug script!

The latest information about MySQL is available on the web at
http://www.mysql.com
Support MySQL by buying support/licenses at http://shop.mysql.com
[root@(none) root]$
[root@(none) root]$ cd /opt ; /opt/bin/mysqld_safe &
[root@(none) /opt]$ Starting mysqld daemon with databases from /opt/var/lib/mysql
/opt/bin/mysqld_safe: eval: 1: Syntax error: "(" unexpected

[1] + Done(2) /opt/bin/mysqld_safe
[root@(none) /opt]$ chown -R root:root /opt/var/lib/mysql
[root@(none) /opt]$ /opt/etc/init.d/S70mysqld start
Starting MySQL................................... ERROR!


as you can see I tried the tutorial, and read everything about it, every post.
I just can't get it to start...
the weird thing is, that no single log reports any errors:confused: they are just empty:(

I managed to start it once "Starting MySQL SUCCES!" guess what... it wasnt there, because the mysql admin (to change the password) said that no server was available on local host to connect to:mad:

what is this... I really can't figure it out on my own anymore:(

btw.. I'm running a WL-500W, but that one is totally the same with the gP(only the wireless chip is not).

thanks:D

raas
22-01-2008, 13:38
Hi,

I've had problems with installing MySQL too when following the tutorial you mentioned.

However.. to install it, I used the following tutorial: http://www.macsat.com/macsat/content/view/73/29/ which is basically the same as the one you mentioned, but with this one I got it to work.

HTH.

Kolandr
22-01-2008, 18:51
wpte,

[root@(none) root]$ ipkg install mysql

your host is (none), try to change it to another name, such as asus, router, etc ;)
there: web interface - IP Config - WAN & LAN - LAN IP Setting - Host Name.
i had same problem with
Syntax error: "(" unexpected

wpte
22-01-2008, 22:12
:D aaah thanks, I got it working now:D:D
you made my day mate;)

the sql server is still not visible to the outside world.. I like MySQL CC to manage all the tables, also a bit safer than php myadmin.
Any way I can put it on? I know it's an option, but I have no idea how to turn it on on the router (I can do it in windows tough :P)

raas
23-01-2008, 11:36
Hi,

is Mysql CC a 'web-application' ? (usign php) if so , you should be able to put it in the webroot.. (assuming that you have php installed.. )


phpmyadmin runs, although a bit slow, but it runs.

wpte
23-01-2008, 22:42
Hi,

is Mysql CC a 'web-application' ? (usign php) if so , you should be able to put it in the webroot.. (assuming that you have php installed.. )


phpmyadmin runs, although a bit slow, but it runs.


no it's a windows app for managing mysql servers. http://sourceforge.net/projects/mysqlcc/

I prefer this one above the php myadmin because this one isn't visible on the web.
However, in this case I have to allow remote clients to connect, this is an option, and I only want this for my intranet:)


--
I also see you got lighttpd working, I just can't get it started... I'm now using the php-thttpd package, you know a good tutorial for the light version?
Are you able to run in on port 80 for internet users to view your site? because I'm curious about that ;-)

wpte
23-01-2008, 23:54
this is how it looks like in windows:
please take a look to the attachment ;)

raas
24-01-2008, 11:17
I also see you got lighttpd working, I just can't get it started... I'm now using the php-thttpd package, you know a good tutorial for the light version?

Sure!, I used the following tutorial http://www.wl500g.info/showthread.php?t=5247 to get it working.. As you might see in the post.. I had some questions too :D , but in the end I got it to work.

I have phpmyadmin in a folder on the 'webserver' which is user/password protected.. that way 'unauthorized' users do not have access..



Are you able to run in on port 80 for internet users to view your site? because I'm curious about that ;-)

Yes.. the outside world is able to connect on standard port 80..
On my internal network it's 8082

on my speedtouch router (I use the asus in AP mode only) I have 'rerouted' outside port 80 (on outside ip) to inside port 8082 (on 192.168.1.1)

wpte
24-01-2008, 16:32
verry nice:D
but I don't know anything about routering...
I run my router as router, so all trafic goes trough it, what exactly do I have to do for that? I have my firewall on so port 80 is not used on the wan;)

I managed to open the server, now port 3306 is opened to everyone.

vi /opt/etc/my.cnf
then find the line skip-networking
and comment it, like:

#skip-networking


now the only problem is... you have to allow hosts (nice security feature:cool:)


mysql -u root -p (yourpassword)
now you're in the command line thingy...
So use the commands below only in this:p

If you want to make a database to connect to:

CREATE DATABASE (your database name);
GRANT ALL ON (your database name).* TO (username)@'(ip adress)' IDENTIFIED BY '(password)';


If you want to change the ip adress and username:

update db set Host='(ip adress)' where Db='(database name)';
update user set Host='(ip adress)' where user='(username)';

ofcourse, if you want to change the password, it would be this (I guess)

update password set Host='(ip adress)' where password='(password)';



well... I guess that makes something clear:D
I hope it's usefull to you, or anyone.
I use MySQLCC and MySQL Front now to manage everything, and it works really good:cool: