by rty » Fri Feb 15, 2013 5:24 am
Alright, as promised, I have tried to install Mariadb again as an alternative to MySql. Here are the steps I took:
1. Back up MySql data and its configuration file.
2. Stop and uninstal MySql
$this->bbcode_second_pass_code('', 'systemctl stop mysqld
systemctl disable mysqld
pacman -Rns mysql')
3. Ensure all remaining MySql files are removed.
As suggested by Winestock, I used the command: "find / -name mysql" to find if there were any remaining MySql file or folder. In my Pogo V2, I found the following:
$this->bbcode_second_pass_quote('', '/')var/lib/mysql
/var/lib/mysql/mysql
4. Remove the folders:
$this->bbcode_second_pass_code('', 'rm -r /var/lib/mysql')
5. Reboot
6. Install Mariadb and configure it:
$this->bbcode_second_pass_quote('', 'p')ogo2:~$ pacman -Syu mariadb
:: Synchronizing package databases...
core is up to date
extra is up to date
community is up to date
alarm is up to date
aur is up to date
:: Starting full system upgrade...
resolving dependencies...
looking for inter-conflicts...
Targets (3): libmariadbclient-5.5.29-1 mariadb-clients-5.5.29-1 mariadb-5.5.29-1
Total Installed Size: 138.84 MiB
Proceed with installation? [Y/n] y
(3/3) checking package integrity [#########################] 100%
(3/3) loading package files [#########################] 100%
(3/3) checking for file conflicts [#########################] 100%
(3/3) checking available disk space [#########################] 100%
(1/3) installing libmariadbclient [#########################] 100%
(2/3) installing mariadb-clients [#########################] 100%
(3/3) installing mariadb [#########################] 100%
Installing MariaDB/MySQL system tables in '/var/lib/mysql' ...
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 MariaDB root USER !
To do so, start the server, then issue the following commands:
'/usr/bin/mysqladmin' -u root password 'new-password'
'/usr/bin/mysqladmin' -u root -h pogo2 password 'new-password'
Alternatively you can run:
'/usr/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://kb.askmonty.org or the
MySQL manual for more instructions.
You can start the MariaDB daemon with:
cd '/usr' ; /usr/bin/mysqld_safe --datadir='/var/lib/mysql'
You can test the MariaDB daemon with mysql-test-run.pl
cd '/usr/mysql-test' ; perl mysql-test-run.pl
Please report any problems with the '/usr/scripts/mysqlbug' script!
The latest information about MariaDB is available at
http://mariadb.org/.
You can find additional information about the MySQL part at:
http://dev.mysql.comSupport MariaDB development by buying support/new features from
Monty Program Ab. You can contact us about this at
sales@montyprogram.com.
Alternatively consider joining our community based development effort:
http://kb.askmonty.org/en/contributing- ... b-project/Optional dependencies for mariadb
perl-dbi
perl-dbd-mysql
pogo2:~$ ls /usr/bin/my*
/usr/bin/myisamchk /usr/bin/mysqldumpslow
/usr/bin/myisam_ftdump /usr/bin/mysql_embedded
/usr/bin/myisamlog /usr/bin/mysql_find_rows
/usr/bin/myisampack /usr/bin/mysql_fix_extensions
/usr/bin/my_print_defaults /usr/bin/mysqlhotcopy
/usr/bin/mysql /usr/bin/mysqlimport
/usr/bin/mysqlaccess /usr/bin/mysql_install_db
/usr/bin/mysqladmin /usr/bin/mysql_plugin
/usr/bin/mysqlbinlog /usr/bin/mysql_secure_installation
/usr/bin/mysqlbug /usr/bin/mysql_setpermission
/usr/bin/mysqlcheck /usr/bin/mysqlshow
/usr/bin/mysql_client_test /usr/bin/mysqlslap
/usr/bin/mysql_config /usr/bin/mysqltest
/usr/bin/mysql_convert_table_format /usr/bin/mysql_tzinfo_to_sql
/usr/bin/mysqld /usr/bin/mysql_upgrade
/usr/bin/mysqld_multi /usr/bin/mysql_waitpid
/usr/bin/mysqld_safe /usr/bin/mysql_zap
/usr/bin/mysqldump /usr/bin/mytop
pogo2:~$ systemctl start mysqld.service
pogo2:~$ systemctl status mysqld
mysqld.service - MariaDB database server
Loaded: loaded (/usr/lib/systemd/system/mysqld.service; disabled)
Active: active (running) since Fri 2013-02-15 08:00:10 AST; 6s ago
Main PID: 380 (mysqld)
CGroup: name=systemd:/system/mysqld.service
ââ380 /usr/bin/mysqld --pid-file=/var/run/mysqld/mysqld.pid
Feb 15 08:00:12 pogo2 mysqld[380]: InnoDB: Doublewrite buffer created
Feb 15 08:00:13 pogo2 mysqld[380]: InnoDB: 127 rollback segment(s) active.
Feb 15 08:00:13 pogo2 mysqld[380]: InnoDB: Creating foreign key constraint sys...es
Feb 15 08:00:13 pogo2 mysqld[380]: InnoDB: Foreign key constraint system table...ed
Feb 15 08:00:13 pogo2 mysqld[380]: 130215 8:00:13 InnoDB: Waiting for the ba...rt
Feb 15 08:00:14 pogo2 mysqld[380]: 130215 8:00:14 Percona XtraDB (
http://www.... 0
Feb 15 08:00:14 pogo2 mysqld[380]: 130215 8:00:14 [Note] Plugin 'PBXT' is dis...d.
Feb 15 08:00:15 pogo2 mysqld[380]: 130215 8:00:15 [Note] Event Scheduler: Loa...ts
Feb 15 08:00:15 pogo2 mysqld[380]: 130215 8:00:15 [Note] /usr/bin/mysqld: rea...s.
Feb 15 08:00:15 pogo2 mysqld[380]: Version: '5.5.29-MariaDB-log' socket: '/va...on
pogo2:~$ mysql_secure_installation
/usr/bin/mysql_secure_installation: line 379: find_mysql_client: command 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):
OK, successfully used password, moving on...
Setting the root password ensures that nobody can log into the MariaDB
root user without the proper authorisation.
Set root password? [Y/n] y
New password:
Re-enter new password:
Password updated successfully!
Reloading privilege tables..
... Success!
By default, a MariaDB installation has an anonymous user, allowing anyone
to log into MariaDB without having to have a user account created for
them. This is intended only for testing, and to make the installation
go a bit smoother. You should remove them before moving into a
production environment.
Remove anonymous users? [Y/n] y
... Success!
Normally, root should only be allowed to connect from 'localhost'. This
ensures that someone cannot guess at the root password from the network.
Disallow root login remotely? [Y/n] y
... Success!
By default, MariaDB comes with a database named 'test' that anyone can
access. This is also intended only for testing, and should be removed
before moving into a production environment.
Remove test database and access to it? [Y/n] y
- Dropping test database...
... Success!
- Removing privileges on test database...
... Success!
Reloading the privilege tables will ensure that all changes made so far
will take effect immediately.
Reload privilege tables now? [Y/n] y
... Success!
Cleaning up...
All done! If you've completed all of the above steps, your MariaDB
installation should now be secure.
Thanks for using MariaDB!
pogo2:~$ mysql -u root -p
Enter password:
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is 16
Server version: 5.5.29-MariaDB-log Source distribution
Copyright (c) 2000, 2012, Oracle, Monty Program Ab and others.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
MariaDB [(none)]> SHOW VARIABLES LIKE "%version%";
+-------------------------+---------------------+
| Variable_name | Value |
+-------------------------+---------------------+
| innodb_version | 1.1.8-29.3 |
| protocol_version | 10 |
| slave_type_conversions | |
| version | 5.5.29-MariaDB-log |
| version_comment | Source distribution |
| version_compile_machine | armv5tel |
| version_compile_os | Linux |
+-------------------------+---------------------+
7 rows in set (0.05 sec)
MariaDB [(none)]> exit
Bye
pogo2:~$