fvdw-sl-12-1 mysql addon

fvdw-sl-12-1 mysql addon

Postby lmendes » Thu Jun 14, 2012 6:32 am

Hi,

Thanks for letting me try out the mysql addon, so I followed the preparation instructions at:
http://www.plugout.net/viewtopic.php?f=15&t=645

    - create share 'fvdw'
    - create user account 'fvdw' (give it r/w access to fvdw share)

Followed by:

    - copying mysql.tar to /share/1000/fvdw/addons
    - then with fvdw user, unpack the tar file:
    Code: Select all
    tar -xvf mysql.tar

    - "now mysql should be ready for use, it runs from /usr/local"

But when I try to run mysql or mysqld it will throw loads of permission errors.
I presume that's because I'm running as root, since I cannot change to other user (fvdw in this case) from terminal/putty.
Is it possible ?

- Luís

PS) Sorry for posting in forum, but apparently I don't have rights to send pvt
lmendes
 
Posts: 6
Joined: Thu Oct 20, 2011 6:25 pm

Re: fvdw-sl-12-1 mysql addon

Postby fvdw » Thu Jun 14, 2012 1:01 pm

you can send PM's after you have posted 10 replies on the forum. This is to encourage members to post on the forum rather then asking questions via PM

Abot the permission erros, you mentioned you extra the tar archive using the user fvdw . That sounds strange to me as youcan only acceess the NAS via ssh to get a command line when using as user root. :scratch

If it only complains on permission issues then start the mysqld daemon using the option to start it under a known user on the NAS (for instance the user "nobody"). There is if I remember correctly a option you can use when starting the daemon to specify under which user it should run. Logotech mediaserver has the same issue.
The user specified doesn't have to have shell access. I will try it myself this evening when I am back at home
fvdw
Site Admin - expert
 
Posts: 13471
Joined: Tue Apr 12, 2011 2:30 pm
Location: Netherlands

Re: fvdw-sl-12-1 mysql addon

Postby fvdw » Thu Jun 14, 2012 7:19 pm

Hi Luis

I looked at and it seems to work ok, before you can use mysqld you need to initialize it.
And you must run it as root.
Access the nwsp2 via SSH as user root with password giveit2me (unless you have changed the default password)

Install the add on by unpacking the tar file as explained in the /share/1000/fvdw/addons folder
Go back to the root directory

Now on the command line initialize mysql like this

Code: Select all
mysql_install_db -u root


this gives as output
Code: Select all
Installing MySQL system tables...
120614 19:56:49 [Warning] Forcing shutdown of 1 plugins
OK
Filling help tables...
120614 19:56:50 [Warning] Forcing shutdown of 1 plugins
OK

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:

/usr/local/bin/mysqladmin -u root password 'new-password'
/usr/local/bin/mysqladmin -u root -h fvdwsl-nwsp2.local password 'new-password'

Alternatively you can run:
/usr/local/bin/mysql_secure_installation

which will also give you the option of removing the test
databases and anonymous user created by default.  This is
strongly recommended for production servers.

See the manual for more instructions.

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

You can test the MySQL daemon with mysql-test-run.pl
cd /usr/local/mysql-test ; perl mysql-test-run.pl

Please report any problems with the /usr/local/bin/mysqlbug script!

The latest information about MySQL is available at http://www.mysql.com/
Support MySQL by buying support/licenses from http://shop.mysql.com/

root@fvdwsl-nwsp2:/



Now you can start mysqld
for instance with this command
Code: Select all
/usr/local/libexec/mysqld --user=root &


This gives as output
Code: Select all
InnoDB: The first specified data file ./ibdata1 did not exist:
InnoDB: a new database to be created!
120614 19:57:03  InnoDB: Setting file ./ibdata1 size to 10 MB
InnoDB: Database physically writes the file full: wait...
120614 19:57:03  InnoDB: Log file ./ib_logfile0 did not exist: new to be created
InnoDB: Setting log file ./ib_logfile0 size to 5 MB
InnoDB: Database physically writes the file full: wait...
120614 19:57:04  InnoDB: Log file ./ib_logfile1 did not exist: new to be created
InnoDB: Setting log file ./ib_logfile1 size to 5 MB
InnoDB: Database physically writes the file full: wait...
InnoDB: Doublewrite buffer not found: creating new
InnoDB: Doublewrite buffer created
InnoDB: Creating foreign key constraint system tables
InnoDB: Foreign key constraint system tables created
120614 19:57:04  InnoDB: Started; log sequence number 0 0
120614 19:57:04 [Note] Event Scheduler: Loaded 0 events
120614 19:57:04 [Note] /usr/local/libexec/mysqld: ready for connections.


Also a command like this should work
Code: Select all
mysqld_safe --user=root &
fvdw
Site Admin - expert
 
Posts: 13471
Joined: Tue Apr 12, 2011 2:30 pm
Location: Netherlands

Re: fvdw-sl-12-1 mysql addon

Postby lmendes » Fri Jun 15, 2012 4:38 pm

Hi,

Yes it works fine, I've assumed that it was meant to be run without root user so I didn't even tried to use it :)
lmendes
 
Posts: 6
Joined: Thu Oct 20, 2011 6:25 pm


Return to Lacie Network Space vs2 and max version

Who is online

Users browsing this forum: No registered users and 3 guests