This is the old XigmaNAS forum in read only mode,
it will taken offline by the end of march 2021!



I like to aks Users and Admins to rewrite/take over important post from here into the new fresh main forum!
Its not possible for us to export from here and import it to the main forum!

[SOLUCIONADO] Problema instalación Mysql

Spanish community

Moderator: MoloMuy

Forum rules
Set-Up GuideFAQsForum Rules
Post Reply
liquidbcn
Starter
Starter
Posts: 30
Joined: 29 Oct 2012 20:18
Status: Offline

[SOLUCIONADO] Problema instalación Mysql

Post by liquidbcn »

Quiero centralizar la biblioteca del XBMC en mi Nas y estoy intentando instalar mysql , pero no consigo que funcione.

He seguido los pasos de este manual https://sites.google.com/site/aganimkar ... extensions

En el último paso no consigo que haga start, me sale este mensaje en la shell.

Code: Select all

Welcome to NAS4Free!
nas:~# mysqld_safe &
[1] 3328
nas:~# Starting mysqld daemon with databases from /var/db/mysql
STOPPING server from pid file /var/db/mysql/nas.local.pid
130220 20:27:16  mysqld ended


[1]    Done                          mysqld_safe
Espero me podáis ayudar de como puedo continuar ya que no consigo nada.

Los datos de mi sistema:

Image

Gracias
FreeBSD 11.2-RELEASE-p4. x64-embedded a Pentium(R) Dual-Core CPU E5800 @ 3.20GHz. 6gb RAM.

liquidbcn
Starter
Starter
Posts: 30
Joined: 29 Oct 2012 20:18
Status: Offline

Re: Problema instalación Mysql

Post by liquidbcn »

He seguido mirando y creo que me falta un carpeta :


Now, you need see <hostname>.err and <hostname>.pid into /mnt/data/db/mysql folder

No me sale que las haya creado:

Code: Select all

nas:~# ls /mnt/NAS/datos/db/mysql
mysql/
FreeBSD 11.2-RELEASE-p4. x64-embedded a Pentium(R) Dual-Core CPU E5800 @ 3.20GHz. 6gb RAM.

User avatar
alexey123
Moderator
Moderator
Posts: 1469
Joined: 19 Aug 2012 08:22
Location: Israel, Karmiel
Contact:
Status: Offline

Re: Problema instalación Mysql

Post by alexey123 »

You have problem
1. with permissions
2. May be symbolic links not working

What mysqlserver you try to install ? 5.0, 5.1 or 5.5
Home12.1.0.4 - Ingva (revision 7091)/ x64-embedded on AMD A8-7600 Radeon R7 A88XM-PLUS/ 16G RAM / UPS Ippon Back Power Pro 600
Lab 12.1.0.4 - Ingva (revision 7091) /x64-embedded on Intel(R) Core(TM) i3-3220 CPU @ 3.30GHz / H61M-DS2 / 4G RAM / UPS Ippon Back Power Pro 600

liquidbcn
Starter
Starter
Posts: 30
Joined: 29 Oct 2012 20:18
Status: Offline

Re: Problema instalación Mysql

Post by liquidbcn »

Mysql 5.0.
FreeBSD 11.2-RELEASE-p4. x64-embedded a Pentium(R) Dual-Core CPU E5800 @ 3.20GHz. 6gb RAM.

User avatar
alexey123
Moderator
Moderator
Posts: 1469
Joined: 19 Aug 2012 08:22
Location: Israel, Karmiel
Contact:
Status: Offline

Re: Problema instalación Mysql

Post by alexey123 »

Special for you I test my note. Log:

Code: Select all

Welcome to NAS4Free!
nas4free:~# mkdir -p /mnt/data/db/mysql
nas4free:~# chmod 777 /mnt/data/db
nas4free:~# ln -s /mnt/data/db/mysql /var/db/mysql
Now I create user and group over webgui.. Continue log

Code: Select all

nas4free:~# pkg_add -r mysql50-server
Error: Unable to get ftp://ftp.freebsd.org/pub/FreeBSD/ports/amd64/packages-9.1-release/Latest/mysql50-server.tbz: File unavailable (e.g., file not found, no access)
pkg_add: unable to fetch 'ftp://ftp.freebsd.org/pub/FreeBSD/ports/amd64/packages-9.1-release/Latest/mysql50-server.tbz' by URL
nas4free:~# setenv PACKAGESITE ftp://ftp.freebsd.org/pub/FreeBSD/ports/amd64/packages-9-current/Latest/
nas4free:~# pkg_add -r mysql50-server                                           Fetching ftp://ftp.freebsd.org/pub/FreeBSD/ports/amd64/packages-9-current/Latest/mysql50-server.tbz... Done.
Fetching ftp://ftp.freebsd.org/pub/FreeBSD/ports/amd64/packages-9-current/All/mysql-client-5.0.95.tbz... Done.
===> Creating users and/or groups.
Using existing group 'mysql'.
Using existing user 'mysql'.

************************************************************************

Remember to run mysql_upgrade (with the optional --datadir=<dbdir> flag)
the first time you start the MySQL server after an upgrade from an
earlier version.

************************************************************************

nas4free:~# rehash
nas4free:~# mysql_install_db
Installing MySQL system tables...
OK
Filling help tables...
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 nas4free.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 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 on the web at
http://www.mysql.com
Support MySQL by buying support/licenses at http://shop.mysql.com

Code: Select all

nas4free:~#  chown -R mysql:mysql /mnt/data/db/mysql/
nas4free:~# mysqld_safe &
[1] 4625
nas4free:~# Starting mysqld daemon with databases from /var/db/mysql
Now you can check into /mnt/data/db/mysql/ files nas4free.local.err and nas4free.local pid. pid is 4625.
You can check your link with winscp. Go to /var/db, you can see such picture


If you see link from mysql folder, try open it - you must jump into /mnt/data/db/mysql with content.
Also, I use ufs formatted disk, I can not use zfs. If you use zfs, please check behavior links on it .

nas4free.local.err content is
130221 07:49:02 mysqld started
InnoDB: The first specified data file ./ibdata1 did not exist:
InnoDB: a new database to be created!
130221 7:49:02 InnoDB: Setting file ./ibdata1 size to 10 MB
InnoDB: Database physically writes the file full: wait...
130221 7:49:02 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...
130221 7:49:02 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
130221 7:49:03 InnoDB: Started; log sequence number 0 0
130221 7:49:03 [Note] /usr/local/libexec/mysqld: ready for connections.
Version: '5.0.95' socket: '/tmp/mysql.sock' port: 3306 FreeBSD port: mysql-server-5.0.95
You do not have the required permissions to view the files attached to this post.
Home12.1.0.4 - Ingva (revision 7091)/ x64-embedded on AMD A8-7600 Radeon R7 A88XM-PLUS/ 16G RAM / UPS Ippon Back Power Pro 600
Lab 12.1.0.4 - Ingva (revision 7091) /x64-embedded on Intel(R) Core(TM) i3-3220 CPU @ 3.30GHz / H61M-DS2 / 4G RAM / UPS Ippon Back Power Pro 600

liquidbcn
Starter
Starter
Posts: 30
Joined: 29 Oct 2012 20:18
Status: Offline

Re: Problema instalación Mysql

Post by liquidbcn »

Thanks a lot for your help Alexei123,

Code: Select all

Welcome to NAS4Free!
nas:~# mkdir -p /mnt/NAS/datos/db/mysql
nas:~# chmod 777 /mnt/NAS/datos/db
nas:~# ln -s /mnt/data/db/mysql /var/db/mysql
ln: /var/db/mysql/mysql: File exists
nas:~# pkg_add -r mysql50-server
Fetching ftp://ftp.freebsd.org/pub/FreeBSD/ports/amd64/packages-9-stable/Latest/mysql50-server.tbz... Done.
Fetching ftp://ftp.freebsd.org/pub/FreeBSD/ports/amd64/packages-9-stable/All/mysql-client-5.0.95.tbz... Done.
===> Creating users and/or groups.
Using existing group 'mysql'.
Using existing user 'mysql'.

************************************************************************

Remember to run mysql_upgrade (with the optional --datadir=<dbdir> flag)
the first time you start the MySQL server after an upgrade from an
earlier version.

************************************************************************

nas:~# chown -R mysql:mysql /mnt/NAS/datos/db/mysql/
nas:~# mysqld_safe &
[1] 12895
mysqld_safe: Command not found.
nas:~#

Code: Select all

nas:~# rehash
[1]    Exit 1                        nas:~# mysqld_safe
nas:~# mysql_install_db
Installing MySQL system tables...
OK
Filling help tables...
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 nas.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 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 on the web at
http://www.mysql.com
Support MySQL by buying support/licenses at http://shop.mysql.com
nas:~# chown -R mysql:mysql /mnt/NAS/datos/db/mysql/
nas:~# mysqld_safe &
[1] 12932
nas:~# Starting mysqld daemon with databases from /var/db/mysql
STOPPING server from pid file /var/db/mysql/nas.local.pid
130221 16:23:53  mysqld ended


FreeBSD 11.2-RELEASE-p4. x64-embedded a Pentium(R) Dual-Core CPU E5800 @ 3.20GHz. 6gb RAM.

liquidbcn
Starter
Starter
Posts: 30
Joined: 29 Oct 2012 20:18
Status: Offline

Re: Problema instalación Mysql

Post by liquidbcn »

I haven´t got any files nas4free.local.err or nas4free.local.pid in /mnt/NAS/datos/db/mysql

Code: Select all

nas:~# ls /var
backups cron    db      empty   etc     log     mount   run     spool   tmp
nas:~# ls /var/db
fuppes          nut             samba
mysql           pkg             updatenotify.db
nas:~# ls /var/db/mysql
ib_logfile0     ibdata1         nas.local.err
ib_logfile1     mysql           test
nas:~# ls /mnt/NAS/datos/db/mysql
mysql
nas:~# ls /mnt/NAS/datos/db/mysql/
mysql
FreeBSD 11.2-RELEASE-p4. x64-embedded a Pentium(R) Dual-Core CPU E5800 @ 3.20GHz. 6gb RAM.

User avatar
alexey123
Moderator
Moderator
Posts: 1469
Joined: 19 Aug 2012 08:22
Location: Israel, Karmiel
Contact:
Status: Offline

Re: Problema instalación Mysql

Post by alexey123 »

liquidbcn wrote:Thanks a lot for your help Alexei123,


Welcome to NAS4Free!
nas:~# mkdir -p /mnt/NAS/datos/db/mysql
nas:~# chmod 777 /mnt/NAS/datos/db
nas:~# ln -s /mnt/data/db/mysql /var/db/mysql
ln: /var/db/mysql/mysql: File exists
Not at all.

I marked fault with red color. May be you tried reinstall mysql and not remove files???
If you want reinstall it you delete package server over webgui page System|Packages. No need delete client. Also You must remove /var/db/mysql and created by mysql files.
May be you use embedded?
I haven´t got any files nas4free.local.err
My nas, where I install mysql have default hostname nas4free. Your nas have default name nas, domain local, so error file = <hostname><domain><err> => your error file is
nas.local.err
Home12.1.0.4 - Ingva (revision 7091)/ x64-embedded on AMD A8-7600 Radeon R7 A88XM-PLUS/ 16G RAM / UPS Ippon Back Power Pro 600
Lab 12.1.0.4 - Ingva (revision 7091) /x64-embedded on Intel(R) Core(TM) i3-3220 CPU @ 3.30GHz / H61M-DS2 / 4G RAM / UPS Ippon Back Power Pro 600

liquidbcn
Starter
Starter
Posts: 30
Joined: 29 Oct 2012 20:18
Status: Offline

Re: Problema instalación Mysql

Post by liquidbcn »

May be you tried reinstall mysql and not remove files???
Is possible. I deleted files with commands "phg_delete mysql-server-...... but i didn´t delete the files "/mnt/data/db/mysql /var/db/mysql"

Code: Select all

nas:~# rmdir /mnt/data/db/mysql /var/db/mysql
rmdir: /mnt/data/db/mysql: No such file or directory
rmdir: /var/db/mysql: Directory not empty
nas:~# rmdir /var/db/mysql
rmdir: /var/db/mysql: Directory not empty
FreeBSD 11.2-RELEASE-p4. x64-embedded a Pentium(R) Dual-Core CPU E5800 @ 3.20GHz. 6gb RAM.

User avatar
alexey123
Moderator
Moderator
Posts: 1469
Joined: 19 Aug 2012 08:22
Location: Israel, Karmiel
Contact:
Status: Offline

Re: Problema instalación Mysql

Post by alexey123 »

liquidbcn wrote:Is possible. I deleted files with commands "phg_delete mysql-server-......
OK, but wegui delete is easy way.
liquidbcn wrote: but i didn´t delete the files "/mnt/data/db/mysql /var/db/mysql"
This is your server and you can not delete folder? :D
In first, if you windows user, install WinSCP. If you not have access as admin for windows, use WinSCP portable - I use it, for keep windows registry clean.
In second. We not created folder /var/db/mysql. We created symbolic link from /var/db/mysql to /mnt/data/db/mysql, we need remove only link

Code: Select all

rm /var/db/mysql
can help you
Home12.1.0.4 - Ingva (revision 7091)/ x64-embedded on AMD A8-7600 Radeon R7 A88XM-PLUS/ 16G RAM / UPS Ippon Back Power Pro 600
Lab 12.1.0.4 - Ingva (revision 7091) /x64-embedded on Intel(R) Core(TM) i3-3220 CPU @ 3.30GHz / H61M-DS2 / 4G RAM / UPS Ippon Back Power Pro 600

liquidbcn
Starter
Starter
Posts: 30
Joined: 29 Oct 2012 20:18
Status: Offline

Re: Problema instalación Mysql

Post by liquidbcn »

Well, I think it works :D

Image

I deleted all files and try install again but mysql55.


Thanks a lot Alexey123 for your help!!!
You do not have the required permissions to view the files attached to this post.
FreeBSD 11.2-RELEASE-p4. x64-embedded a Pentium(R) Dual-Core CPU E5800 @ 3.20GHz. 6gb RAM.

User avatar
alexey123
Moderator
Moderator
Posts: 1469
Joined: 19 Aug 2012 08:22
Location: Israel, Karmiel
Contact:
Status: Offline

Re: [SOLUCIONADO] Problema instalación Mysql

Post by alexey123 »

Well!!
But I think you make small fault. In case mysql 55 folder db/mysql need have 3 folders inside <performance schema> <test> <mysql> and only 5 files.
But if you have pid and in.err files you not find any warning - ItWORK!
Try to define root password and connect to mysql. If you connect to it and success execute commands - it work.

Why you need Mysql?
Home12.1.0.4 - Ingva (revision 7091)/ x64-embedded on AMD A8-7600 Radeon R7 A88XM-PLUS/ 16G RAM / UPS Ippon Back Power Pro 600
Lab 12.1.0.4 - Ingva (revision 7091) /x64-embedded on Intel(R) Core(TM) i3-3220 CPU @ 3.30GHz / H61M-DS2 / 4G RAM / UPS Ippon Back Power Pro 600

liquidbcn
Starter
Starter
Posts: 30
Joined: 29 Oct 2012 20:18
Status: Offline

Re: [SOLUCIONADO] Problema instalación Mysql

Post by liquidbcn »

Why you need Mysql?
I want mysql for the program XBMC.
Try to define root password and connect to mysql. If you connect to it and success execute commands - it work.
That I have not clear how to do it.

I will try to install the Myphpadmin.
FreeBSD 11.2-RELEASE-p4. x64-embedded a Pentium(R) Dual-Core CPU E5800 @ 3.20GHz. 6gb RAM.

User avatar
alexey123
Moderator
Moderator
Posts: 1469
Joined: 19 Aug 2012 08:22
Location: Israel, Karmiel
Contact:
Status: Offline

Re: [SOLUCIONADO] Problema instalación Mysql

Post by alexey123 »

liquidbcn wrote:
Why you need Mysql?
I want mysql for the program XBMC.
If you want runXBMC from nas4free - I think better way install it over jail.
If you'll run xbmc on another PC - hhmmmmm, may be you not need run mysql on NAS4FRee. Where you find setup instruction?

Try to define root password and connect to mysql. If you connect to it and success execute commands - it work.
That I have not clear how to do it.

I will try to install the Myphpadmin.[/quote]
Define root password

Code: Select all

/usr/local/bin/mysqladmin -u root -h localhost password 'new-password'
/usr/local/bin/mysqladmin -u root -h <hostname>.<domain> password 'new-password' 
You need type new password without quotes.
Home12.1.0.4 - Ingva (revision 7091)/ x64-embedded on AMD A8-7600 Radeon R7 A88XM-PLUS/ 16G RAM / UPS Ippon Back Power Pro 600
Lab 12.1.0.4 - Ingva (revision 7091) /x64-embedded on Intel(R) Core(TM) i3-3220 CPU @ 3.30GHz / H61M-DS2 / 4G RAM / UPS Ippon Back Power Pro 600

liquidbcn
Starter
Starter
Posts: 30
Joined: 29 Oct 2012 20:18
Status: Offline

Re: [SOLUCIONADO] Problema instalación Mysql

Post by liquidbcn »

If you want runXBMC from nas4free - I think better way install it over jail.
If you'll run xbmc on another PC - hhmmmmm, may be you not need run mysql on NAS4FRee. Where you find setup instruction?
It,s for 2 apptv,s and 2 pc,s in to my house. I want one librery for all. I think that install mysql over jail is better for before upgrades of nas4free, but i Knew later :D .
FreeBSD 11.2-RELEASE-p4. x64-embedded a Pentium(R) Dual-Core CPU E5800 @ 3.20GHz. 6gb RAM.

liquidbcn
Starter
Starter
Posts: 30
Joined: 29 Oct 2012 20:18
Status: Offline

Re: [SOLUCIONADO] Problema instalación Mysql

Post by liquidbcn »

]
Define root password
CÓDIGO: SELECCIONAR TODO
/usr/local/bin/mysqladmin -u root -h localhost password 'new-password'
/usr/local/bin/mysqladmin -u root -h <hostname>.<domain> password 'new-password'

You need type new password without quotes
I think that is ok. I install MyphpAdmin with https://sites.google.com/site/aganimkar ... phppgadmin


nas_mysql.jpg
;)
You do not have the required permissions to view the files attached to this post.
FreeBSD 11.2-RELEASE-p4. x64-embedded a Pentium(R) Dual-Core CPU E5800 @ 3.20GHz. 6gb RAM.

Post Reply

Return to “Español”