DSM-G600, DNS-3xx and NSA-220 Hack Forum

Unfortunately no one can be told what fun_plug is - you have to see it for yourself.

You are not logged in.

Announcement

#76 2008-10-01 15:30:14

WildSioux
Member
Registered: 2007-03-05
Posts: 71

Re: MySQL on DNS-323

forre wrote:

WildSioux wrote:

I can get into something using:  mysql -u "localhost"

It is OK. You can check soem with following commands:

Code:

mysql -u "localhost"
mysql> show databases;
+--------------------+
| Database           |
+--------------------+
| information_schema | 
| test               | 
+--------------------+
2 rows in set (0.00 sec)

mysql> use information_schema;
Database changed
mysql> select * from USER_PRIVILEGES;
+----------------+---------------+----------------+--------------+
| GRANTEE        | TABLE_CATALOG | PRIVILEGE_TYPE | IS_GRANTABLE |
+----------------+---------------+----------------+--------------+
| ''@'localhost' | NULL          | USAGE          | NO           | 
+----------------+---------------+----------------+--------------+
1 row in set (0.00 sec)

WildSioux wrote:

[However, how do I find out what my username and password is?  Also, instead of root, I can get into "localhost."  Don't know how that happened.

When installing mysql, the user root exist without any password

do same commands after login as root to see the differencis (mysql -u root)

To change root password, see earlier message from emailpr

Ok, the above commands work for "localhost."  However, when I enter (mysql -u root), I get this

Code:

/ # mysql -u root
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: N
O)
/ #

Also, I installed phpMyAdmin but its not able to connect to the mysql database.  I may try reinstalling the mysql again and see if that clears it up.

Offline

 

#77 2008-10-01 16:44:15

forre
Member
Registered: 2008-04-22
Posts: 26

Re: MySQL on DNS-323

If you not have any relevant data in you mysql database, you can follow this instructions:

Code:

> sh /ffp/start/mysqld.sh stop
> rm -r /ffp/var/mysql/*
> sh /ffp/mysqld.sh start

Offline

 

#78 2008-10-01 18:29:02

WildSioux
Member
Registered: 2007-03-05
Posts: 71

Re: MySQL on DNS-323

forre,

I went ahead and deleted funplug and started fresh with a clean install of both funplug and mysql.  I reinstalled everything and now I am getting this.

/ # mysql -u root

Code:

Warning: World-writable config file '/ffp/etc/my.cnf' is ignored
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/ffp/var
/mysql.sock' (2)
/ #

I searched the thread and found someone else who had the same problem and you gave this recommendation.

raid123 wrote:

but I do have this in my mysqld.sh:

ln -s /ffp/var/mysql.sock /tmp/mysql.sock

The package didn't work for me the first time either.  I had to make some tweaks to get it to work, and I think this may be one of them.  There may be a way to repoint the sock file to /ffp/var, but at least this line got me up and running.

However, where does that line go in mysqld.sh?

I am confused now since the first time I installed this didn't happen and now this. 

Thanks for helping

Offline

 

#79 2008-10-01 20:42:47

WildSioux
Member
Registered: 2007-03-05
Posts: 71

Re: MySQL on DNS-323

^^^^

I fixed the above "Warning: World-writable config file..." with this
[html]http://forums.mysql.com/read.php?10,141647,141885#msg-141885[/html]

It's to do with the permissions of the file, not it's contents

at the command prompt type ls -la mysql.cnf

it should look something like
-rw-r---r--

chmod 644 my.cnf will set it to be not world writable.

I then typed in "sh /mnt/HD_a2/ffp/start/mysqld.sh start" and it built the tables

Now I can log in to "root" using
"mysql -u root"

Now I just need to see how to make it all work with phpMyAdmin or another program.

Offline

 

#80 2008-10-02 02:25:12

WildSioux
Member
Registered: 2007-03-05
Posts: 71

Re: MySQL on DNS-323

Ok, now that I got the above installed and working.  How do I connect a program to the sql database?  Something like kplaylist or phpMyAdmin?

EDIT:  NM, I got it to work.  I had to change the extension directory in php.ini to
"/ffp/lib/php/extensions/no-debug-non-zts-20060613"

Restarted lighttpd and now it works.  I installed Joomla.  Had to add mbstring.so and zlib.so to the php.ini as well.

Last edited by WildSioux (2008-10-02 05:27:32)

Offline

 

#81 2008-10-02 13:58:32

xhaos
New member
Registered: 2008-10-02
Posts: 3

Re: MySQL on DNS-323

hello, i am also trying to install ampache on dns323 and i cant find a package for it.
from where did you find it for dns? i cant install http://ampache.org/downloads/ampache-3.4.3.tar.gz because its not for this device.
appreciate any answer

Offline

 

#82 2008-10-02 22:51:11

WildSioux
Member
Registered: 2007-03-05
Posts: 71

Re: MySQL on DNS-323

WildSioux wrote:

Ok, now that I got the above installed and working.  How do I connect a program to the sql database?  Something like kplaylist or phpMyAdmin?

EDIT:  NM, I got it to work.  I had to change the extension directory in php.ini to
"/ffp/lib/php/extensions/no-debug-non-zts-20060613"

Restarted lighttpd and now it works.  I installed Joomla.  Had to add mbstring.so and zlib.so to the php.ini as well.

Damn, this is wrong and it still won't connect.  The above directory I quoted is wrong.  It was giving me Internal Server 500 errors when I tried to install phpMyAdmin.

I forgot about the "./" in front of the directory.  Sorry for the confusion...  No more internal server errors 500

I am at a loss right now in how to setup phpMyAdmin and how to connect it to a database.  I have copied the directory over to the box.  I have done what the instructions told me to do, make a config directory blah blah.  But then I navigate to http://..../phpMyAdmin/scripts/setup.php  And it works but then what do I enter for the server info?

I enter what is in the "my.cnf" file and click add.  It add a database but then it is showing something like this.

SQL files upload    disabled
Exported files on server   disabled
Charset conversion         disabled

And if I navigate to http://.../phpMyAdmin   I get this...

phpMyAdmin - Error

Cannot load mysql extension. Please check your PHP configuration. - Documentation

Grrr

Last edited by WildSioux (2008-10-02 23:24:37)

Offline

 

#83 2008-10-03 18:22:16

forre
Member
Registered: 2008-04-22
Posts: 26

Re: MySQL on DNS-323

WildSioux wrote:

I am at a loss right now in how to setup phpMyAdmin and how to connect it to a database .... what do I enter for the server info?

I have following server setup in my config.inc.php file.

Code:

/* Authentication type */
//$cfg['Servers'][$i]['auth_type'] = 'cookie';
$cfg['Servers'][$i]['user']          = 'root';
$cfg['Servers'][$i]['password']      = 'password'; // use here your password
/* Server parameters */
$cfg['Servers'][$i]['host'] = 'localhost';
$cfg['Servers'][$i]['connect_type'] = 'tcp';
$cfg['Servers'][$i]['compress'] = false;
/* Select mysqli if your server has it */
$cfg['Servers'][$i]['extension'] = 'mysql';

Have you set a password for mysql user root?
Have you added extension=mysql.so in your php.ini?

Offline

 

#84 2008-10-03 19:16:54

WildSioux
Member
Registered: 2007-03-05
Posts: 71

Re: MySQL on DNS-323

forre wrote:

Have you set a password for mysql user root?
Have you added extension=mysql.so in your php.ini?

Yes to both of those...

I have a test.php setup and when I run that in firefox, its not showing mysql.  It has the mysql stuff at the top under "Configure Command."  But when I scroll down, it doesn't show the Mysql box.

This leads me to believe that mysql isn't being loaded.  I have done both sh lighttpd.sh start and, sh mysqld.sh start

I can do the mysql -u root -p >>>password and it gives me the mysql>  If I type "show databases;" it will show me the output.

So, I have installed mysql properly.  It just isn't being loaded/linked with php.  Is there anything I need to change in my lighttpd.conf file?

BTW, I downloaded and am using the php.ini from your site.

Thanks

Offline

 

#85 2008-10-03 21:36:28

forre
Member
Registered: 2008-04-22
Posts: 26

Re: MySQL on DNS-323

Which mysql and php package have you installed?

when I type php -m I've got following output (included mysql)

/mnt/usb1/ffp/etc # php -m
[PHP Modules]
date
dom
filter
gd
hash
iconv
json
libxml
mbstring
mysql
openssl
pcntl
pcre
PDO
posix
Reflection
session
SimpleXML
sockets
SPL
SQLite
standard
sysvsem
xml
xmlreader
xmlwriter
zlib

[Zend Modules]


I have updated the php.ini on my site. (included with extension_dir = "/ffp/lib/php/extensions/no-debug-non-zts-20060613") that is working for me.

Offline

 

#86 2008-10-04 06:36:14

WildSioux
Member
Registered: 2007-03-05
Posts: 71

Re: MySQL on DNS-323

forre...

From your site, I installed
wget....mysql-5.1.28-rc-1.tgz
wget...php-5.2.6-mysql51-1.tgz

This is my php -m output

/ # php -m
PHP Warning:  PHP Startup: Unable to load dynamic library '/ffp/lib/php/extensio
ns/no-debug-non-zts-20060613/gd.so' - File not found in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/ffp/lib/php/extensio
ns/no-debug-non-zts-20060613/mysql.so' - File not found in Unknown on line 0
[PHP Modules]
date
dom
filter
hash
iconv
json
libxml
mbstring
openssl
pcntl
pcre
PDO
posix
Reflection
session
SimpleXML
sockets
SPL
SQLite
standard
sysvsem
xml
xmlreader
xmlwriter
zlib

[Zend Modules]

/ #

Just as I suspected, its not running but it is installed.  I checked that folder and they are in there.  So now what do I do?  I copied your new php.ini file and still nothing after restarting it.

Thanks for helping!

Offline

 

#87 2008-10-04 13:15:18

forre
Member
Registered: 2008-04-22
Posts: 26

Re: MySQL on DNS-323

I have no other idea then checking that all needed packages are installed like gd, libjpeg, libpng, openssl, uclibc and zlib and required .so files exist
(ldd ldd /ffp/lib/php/extensions/no-debug-non-zts-20060613/mysql.so
ldd /ffp/lib/php/extensions/no-debug-non-zts-20060613/gd.so)

Offline

 

#88 2008-10-04 18:58:13

WildSioux
Member
Registered: 2007-03-05
Posts: 71

Re: MySQL on DNS-323

Hmm, I'm going to try and install your other mysql version.  In my google search, I found that the permissions of mysql.sock may need to be changed.  I also found that my mysql.sock file is in /ffp/var/ folder instead of /ffp/var/mysql/ as indicated in the my.cnf file.  I wonder if that has anything to do with this?

This is pissing me off.  How others have this installed without these problems.  Again, I am going to try the other version and see if that works.  I think those who have this working have the older version from August.

To those who have this working, please list what version mysql you installed from forre's site.  5.1... or 5.2... Thanks 5.2 may have an error as I am finding out.

Offline

 

#89 2008-10-05 01:27:50

WildSioux
Member
Registered: 2007-03-05
Posts: 71

Re: MySQL on DNS-323

forre...

Success!!!  Kind of...

I managed to install mysql and confirmed it is enabled/running by php -m and my test.php  Now for some reason gd.so can't be found.

What I did was delete ffp and started fresh, once again.  I installed ffp, and your older mysql packages.  Confirmed that mysql was running with that.  For whatever reason, that is odd since I installed it the same exact way.  So I deleted ffp again, and installed your newer mysql packages (the original two I started with but wouldn't run mysql in the first place.  Odd...

So now with mysql running, I set out to setup phpmyadmin.  Back came the 500 - Internal Server Errors.  I found it was in my phpmyadmin config.inc.php file that was the problem.  I tried what you posted and that gave me the 500 - Internal Server Errors.  But, on 3 refreshes it finally loaded part of the right half with the server error on the left panel.  It also gave me a no database - no privilege error on the right panel.  I couldn't add a database.

So I finally set the config.inc.php file with these settings...

Code:

<?php
$i=0;
$i++;
$cfg['Servers'][$i]['auth_type'] = 'http';
$cfg['Servers'][$i]['user'] = 'user here';
$cfg['Servers'][$i]['password'] = 'my password';
?>

Aha, that loads everything up properly but I still get the 500 - Internal Server Errors.  Again, refreshing it about 3 times finally brings it up.  I think these are due to it running out of memory.  What do you think?

Lastly, how come when I did this
/ffp/bin/mysqladmin -u root password 'new-password'

It made the username my password?  And how do I change it back to root?

Thanks and damn, I need a few beers after all this mess.

btw...somewhere in all of this mess when I was editing my config.inc.php file.  It cause the DNS323 to become low on memory flashing the network light constantly.  I lost access to the drive through file explorer and couldn't save the file.  I logged on to the web admin page for it and when I clicked on "restart," both hard drive lights turned orange.  Oh !@#$ I thought...  But I restarted anyways and all was normal after it booted up.

Offline

 

#90 2009-07-02 20:13:03

npereira
Member
Registered: 2009-06-29
Posts: 11

Re: MySQL on DNS-323

I have followed this thread through and through and I'm still getting the error on the page about:
phpMyAdmin - Error
Cannot load mysql extension. Please check your PHP configuration. - Documentation

Can anyone help me?

Offline

 

#91 2009-07-02 20:24:26

vrobi
New member
Registered: 2009-05-12
Posts: 3

Re: MySQL on DNS-323

hi

edit php.ini (ffp/etc/php.ini)

memory_limit = 16M      ;

vrobi

Offline

 

#92 2009-07-02 20:36:58

npereira
Member
Registered: 2009-06-29
Posts: 11

Re: MySQL on DNS-323

Thanks for that note, what's the reason to change it from 128M to 16M?

Also, how does everyone using lighttpd get a page with text along with the directory tructure?  I'm trying to do this, but dont seem able to...

Thanks

Offline

 

#93 2009-07-02 20:44:37

npereira
Member
Registered: 2009-06-29
Posts: 11

Re: MySQL on DNS-323

nevermind again, sough in lighttpd that the readme file needs to be README.txt    uppercase.

Offline

 

Board footer

Powered by PunBB
© Copyright 2002–2010 PunBB