Hi, can you please update mysql to a more recent version like 5.7?
Thanks
I won't have time to work on this. Patches welcome.
Hi, trying to install mariadb-server v5.5.56-1 on RT-AC68U router through entware-ng.arm, kernel v2.6.36.4brcmarm, firmware v380.67 RMerlin.
admin@RT-AC68U:/tmp/mnt/sda1# mysql_install_db --force
/opt/bin/mysql_install_db: line 340: hostname: not found
chown: unknown user root
Cannot change ownership of the database directories to the 'root'
user. Check that you have the necessary permissions and try again.
I change user from root to admin in my.cnf and solve hostname
cat >> /opt/bin/hostname << 'EOF'
cat /proc/sys/kernel/hostname
EOF
chmod 0755 /opt/bin/hostname
Run again
````
admin@RT-AC68U:/tmp/mnt/sda1# mysql_install_db --force
Installing MariaDB/MySQL system tables in '/opt/var/mysql/' ...
170724 15:14:55 [Warning] 'THREAD_CONCURRENCY' is deprecated and will be removed in a future release.
170724 15:14:55 [Note] /opt/bin/mysqld (mysqld 5.5.56-MariaDB) starting as process 8109 ...
OK
Filling help tables...
170724 15:14:56 [Warning] 'THREAD_CONCURRENCY' is deprecated and will be removed in a future release.
170724 15:14:56 [Note] /opt/bin/mysqld (mysqld 5.5.56-MariaDB) starting as process 8122 ...
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 MariaDB 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 RT-AC68U password 'new-password'
Alternatively you can run:
'/opt/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 MariaDB Knowledgebase at http://mariadb.com/kb or the
MySQL manual for more instructions.
You can start the MariaDB daemon with:
cd '/opt' ; /opt/bin/mysqld_safe --datadir='/opt/var/mysql/'
You can test the MariaDB daemon with mysql-test-run.pl
cd '/opt/mysql-test' ; perl mysql-test-run.pl
Please report any problems at http://mariadb.org/jira
The latest information about MariaDB is available at http://mariadb.org/.
You can find additional information about the MySQL part at:
http://dev.mysql.com
Consider joining MariaDB's strong and vibrant community:
https://mariadb.org/get-involved/
Trying to create a password
admin@RT-AC68U:/tmp/mnt/sda1# /opt/bin/mysqladmin -u root password new-password
-sh: /opt/bin/mysqladmin: not found
List /opt/bin files
admin@RT-AC68U:/tmp/mnt/sda1# ls -l /opt/bin
-rwxr-xr-x 1 admin root 3469440 May 30 20:25 aria_chk
-rwxr-xr-x 1 admin root 3304184 May 30 20:25 aria_dump_log
-rwxr-xr-x 1 admin root 3319576 May 30 20:25 aria_ftdump
-rwxr-xr-x 1 admin root 3340448 May 30 20:25 aria_pack
-rwxr-xr-x 1 admin root 3439120 May 30 20:25 aria_read_log
-rwxr-xr-x 1 admin root 217784 May 30 20:25 find
-rwxr-xr-x 1 admin root 30 Jul 24 18:14 hostname
-rwxr-xr-x 1 admin root 31744 May 30 20:25 locale.new
-rwxr-xr-x 1 admin root 284988 May 30 20:25 localedef.new
-rwxr-xr-x 1 admin root 1446 May 30 20:25 msql2mysql
-rwxr-xr-x 1 admin root 2729280 May 30 20:25 my_print_defaults
-rwxr-xr-x 1 admin root 2972712 May 30 20:25 myisam_ftdump
-rwxr-xr-x 1 admin root 3072432 May 30 20:25 myisamchk
-rwxr-xr-x 1 admin root 2959208 May 30 20:25 myisamlog
-rwxr-xr-x 1 admin root 2991968 May 30 20:25 myisampack
-rwxr-xr-x 1 admin root 4247 May 30 20:25 mysql_convert_table_format
-rwxr-xr-x 1 admin root 15987 May 30 20:25 mysql_install_db
-rwxr-xr-x 1 admin root 2736388 May 30 20:25 mysql_plugin
-rwxr-xr-x 1 admin root 12144 May 30 20:25 mysql_secure_installation
-rwxr-xr-x 1 admin root 17485 May 30 20:25 mysql_setpermission
-rwxr-xr-x 1 admin root 2732688 May 30 20:25 mysql_tzinfo_to_sql
-rwxr-xr-x 1 admin root 2805556 May 30 20:25 mysql_upgrade
-rwxr-xr-x 1 admin root 3888 May 30 20:25 mysql_zap
-rwxr-xr-x 1 admin root 2943796 May 30 20:25 mysqlbinlog
-rwxr-xr-x 1 admin root 9612704 May 30 20:25 mysqld
-rwxr-xr-x 1 admin root 24834 May 30 20:25 mysqld_multi
-rwxr-xr-x 1 admin root 26958 May 30 20:25 mysqld_safe
-rwxr-xr-x 1 admin root 34941 May 30 20:25 mysqlhotcopy
-rwxr-xr-x 1 admin root 130972 May 30 20:25 opkg
-rwxr-xr-x 1 admin root 2807012 May 30 20:25 perror
-rwxr-xr-x 1 admin root 2713372 May 30 20:25 replace
-rwxr-xr-x 1 admin root 2729056 May 30 20:25 resolve_stack_dump
-rwxr-xr-x 1 admin root 3928 May 30 20:25 resolveip
-rwxrwxrwx 1 admin root 609 Jul 24 18:05 services
-rwxr-xr-x 1 admin root 45616 May 30 20:25 stty
-rwxr-xr-x 1 admin root 52784 May 30 20:25 xargs
There is no mysqladmin file
Trying another method
admin@RT-AC68U:/tmp/mnt/sda1# /opt/bin/mysql_secure_installation
/opt/bin/mysql_secure_installation: line 393: find_mysql_client: not found
NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MariaDB
SERVERS IN PRODUCTION USE! PLEASE READ EACH STEP CAREFULLY!
In order to log into MariaDB to secure it, we'll need the current
password for the root user. If you've just installed MariaDB, and
you haven't set the root password yet, the password will be blank,
so you should just press enter here.
Enter current password for root (enter for none):
/opt/bin/mysql_secure_installation: line 406: /opt/bin/mysql: not found
Symlink mysql
ln -s /opt/bin/mysqld /opt/bin/mysql
Try again
admin@RT-AC68U:/tmp/mnt/sda1# /opt/bin/mysql_secure_installation
/opt/bin/mysql_secure_installation: line 393: find_mysql_client: not found
NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MariaDB
SERVERS IN PRODUCTION USE! PLEASE READ EACH STEP CAREFULLY!
In order to log into MariaDB to secure it, we'll need the current
password for the root user. If you've just installed MariaDB, and
you haven't set the root password yet, the password will be blank,
so you should just press enter here.
Enter current password for root (enter for none):
170724 15:20:25 [Note] /opt/bin/mysql (mysqld 5.5.56-MariaDB) starting as process 8826 ...
170724 15:20:25 [ERROR] Can't find messagefile '/tmp/mnt/sda1/entware-ng.arm/share/errmsg.sys'
170724 15:20:25 [ERROR] Aborting
Copy errmsg.sys
cp /opt/share/mysql/english/errmsg.sys /opt/share/
Again
admin@RT-AC68U:/tmp/mnt/sda1# /opt/bin/mysql_secure_installation
/opt/bin/mysql_secure_installation: line 393: find_mysql_client: not found
NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MariaDB
SERVERS IN PRODUCTION USE! PLEASE READ EACH STEP CAREFULLY!
In order to log into MariaDB to secure it, we'll need the current
password for the root user. If you've just installed MariaDB, and
you haven't set the root password yet, the password will be blank,
so you should just press enter here.
Enter current password for root (enter for none):
170724 15:22:38 [Note] /opt/bin/mysql (mysqld 5.5.56-MariaDB) starting as process 9312 ...
170724 15:22:38 [Warning] An old style --language or -lc-message-dir value with language specific part detected: /tmp/mnt/sda1/entware-ng.arm/share/
170724 15:22:38 [Warning] Use --lc-messages-dir without language specific part instead.
/opt/bin/mysql: Please consult the Knowledge Base to find out how to run mysqld as root!
170724 15:22:38 [ERROR] Aborting
170724 15:22:38 [Note] /opt/bin/mysql: Shutdown complete
````
Some hint please?
The package has only been tested with LEDE ad OpenWrt. It is also not prepared to be installed into /opt.
@TeHashX i have the same problem with you! have you figure out now? My router is N-18U
edit opt/etc/mysql/my.cnf
user=root
>user=admin
bind-adress=127.0.0.1
>bind-adress=192.168.1.1
ctrl-o to save and enter key. ctrl-x to exit.
try again # mysql_install_db --force
Same problem as TeHashX. There is no mysqladmin file
I solved same problem with follow commands:
opkg install mariadb-client
mysql -u root
UPDATE mysql.user SET Password=PASSWORD('NEW_PASSWORD') WHERE User='root';
FLUSH PRIVILEGES;
Now it works.
After it I found that package mariadb-client-extra contains file mysqladmin :) I didn't try it.