[Fedora-it] Mysql che fine ha fatto?!

luigi sabotti luigi.sabotti a gmail.com
Mer 18 Dic 2013 10:44:05 UTC


Il giorno 18 dicembre 2013 11:32, Daniele Nasuti
<daniele.nasuti a gmail.com>ha scritto:

> Capito, vediamo se ho capito bene, i comandi SQL sono identici, i comandi
> e le configurazioni php per mysql rimangono invariati.
> Giusto?
>
> Perciò se volessi continuare ad usare mysql-workbench verso un database
> mariadb, questi funzioneranno correttamente, esatto?
>
>
> Il giorno 18 dicembre 2013 11:24, Robert Mayr <robyduck a fedoraproject.org>ha scritto:
>
>> Il 18 dicembre 2013 11:12, Daniele Nasuti <daniele.nasuti a gmail.com> ha
>> scritto:
>>
>> > Buongiorno lista,
>> > sto installando mysql e succede una cosa strana, probabilmente sarrà una
>> > domada da niubbo.
>> > Come mai io lancio
>> > #yum install mysql
>> > e mi propone l'installazione di mariadb?!
>> >
>> > Grazie in anticipo e buona giornata :)
>> >
>> > --
>> > Daniele
>>
>> Ciao Daniele,
>> mysql è stato "abbandonato" a favore di mariadb già dalla versione 19.
>> Di default veniva installato comunque mariadb, anche se lanciavi
>> l'installazione richiedendo mysql. Ora questo redirect, se vogliamo
>> chiamarlo così, è stato tolto. Tra l'altro non esiste nemmeno più un
>> servizio mysqld, per attivarlo dovrai dare un:
>>
>> # systemctl enable mariadb
>>
>> Mariadb è perfettamente compatibile con i database che hai, anche se
>> fatti con mysql.
>> Ciao
>>
>> --
>> Robert Mayr
>> (robyduck)
>> _______________________________________________
>> it-users mailing list
>> it-users a lists.fedoraproject.org
>> https://admin.fedoraproject.org/mailman/listinfo/it-users
>>
>
>
> _______________________________________________
> it-users mailing list
> it-users a lists.fedoraproject.org
> https://admin.fedoraproject.org/mailman/listinfo/it-users
>

Questi i comandi che utilizzo per installare mariadb e renderlo sicuro


[root a www ~]#yum -y install mariadb-server
[
root a www ~]#systemctl start mysqld.service

[root a www ~]#systemctl enable mysqld.service

ln -s '/lib/systemd/system/mysqld.service'
'/etc/systemd/system/multi-user.target.wants/mysqld.service'

[root a www ~]#mysql -u root   # connect to MariaDBs

Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 2
Server version: 5.5.31-MariaDB MariaDB Server

Copyright (c) 2000, 2013, Oracle, Monty Program Ab and others.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.


# show user info

MariaDB [(none)]>select user,host,password from mysql.user;

+------+------------------+----------+
| user | host             | password |
+------+------------------+----------+
| root | localhost        |          |
| root | www.server.world |          |
| root | 127.0.0.1        |          |
| root | ::1              |          |
|      | localhost        |          |
|      | www.server.world |          |
+------+------------------+----------+
6 rows in set (0.00 sec)


 # set root password

MariaDB [(none)]>set password for root a localhost=password('password');
Query OK, 0 rows affected (0.00 sec)

# set root password

MariaDB [(none)]>set password for root@'127.0.0.1'=password('password');
Query OK, 0 rows affected (0.00 sec)

# set root password

MariaDB [(none)]>set password for root@'www.server.world'=password('password');

Query OK, 0 rows affected (0.00 sec)

# delete IPV6 user ( if you don't need )

MariaDB [(none)]>delete from mysql.user where user='root' and host='::1';
Query OK, 1 rows affected (0.00 sec)

# delete anonymous user

MariaDB [(none)]>delete from mysql.user where user='';
Query OK, 2 rows affected (0.00 sec)

MariaDB [(none)]>select user,host,password from mysql.user;

+------+------------------+-------------------------------------------+
| user | host             | password                                  |
+------+------------------+-------------------------------------------+
| root | localhost        | *xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx |
| root | www.server.world | *xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx |
| root | 127.0.0.1        | *xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx |
+------+------------------+-------------------------------------------+
3 rows in set (0.00 sec)


MariaDB [(none)]>exit
Bye

[root a www ~]#mysql -u root -p

# connect with root

Enter password:
# MariaDB root password you set

Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 3
Server version: 5.5.31-MariaDB MariaDB Server

Copyright (c) 2000, 2013, Oracle, Monty Program Ab and others.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.


MariaDB [(none)]>exit
Bye
-------------- parte successiva --------------
Un allegato HTML è stato rimosso...
URL: <http://lists.fedoraproject.org/pipermail/it-users/attachments/20131218/dc67ca7c/attachment-0001.html>


Maggiori informazioni sulla lista it-users