Connexió a MariaDB des de Putty

mysql -u root -p -P 3307 --socket=/run/mysqld/mysqld10.sock

Quins permisos té miquel:

SHOW GRANTS FOR 'miquel'@'%';
(des consola MariaDB)

MariaDB [(none)]> SHOW GRANTS FOR 'miquel'@'%';
+-------------------------------------------------------------------------------------------------------+
| Grants for miquel@%                                                                                   |
+-------------------------------------------------------------------------------------------------------+
| GRANT USAGE ON *.* TO `miquel`@`%` IDENTIFIED BY PASSWORD '*C0C6BA4DF19B94D2C2BA6C12DD5EFF4E201B9478' |
| GRANT ALL PRIVILEGES ON `polidic_eng`.* TO `miquel`@`%`                                               |
+-------------------------------------------------------------------------------------------------------+
2 rows in set (0.000 sec)

MariaDBDB  [(none)]> (el none vol dir que no està connectat a cab base de dades)




Selecciona la base de dades polidic_eng:

USE polidic_eng;

Verifica els permisos de l'usuari miquel:
SHOW GRANTS FOR 'miquel'@'%';

si cal: 
GRANT ALL PRIVILEGES ON polidic_eng.* TO 'miquel'@'%' IDENTIFIED BY 'Beseit1968!';
FLUSH PRIVILEGES;

urqtejmi@synology_vall:~$ mysql -u root -p -P 3307 –socket=/run/mysqld/mysqld10.sock
Enter password:
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is 1498
Server version: 10.11.6-MariaDB Source distribution

Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.

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

MariaDB [(none)]>

Reiniar maria db

mysqMariaDB es troba aqui:

urqtejmi@synology_vall:
cd /volume2/@appstore

ActiveBackup			
ActiveBackup-Office365		
AntiVirus											
Apache2.2
Apache2.4		
AudioStation																			
Calendar											
CloudSync							
CodecPack											
Contacts											
ContainerManager		
DNSServer					
DownloadStation																				
Git	
HyperBackup									
HyperBackupVault		
LogCenter			
MailClient															
MailPlus-Server	
															
MariaDB10			

Node.js_v14	
Node.js_v16	
Node.js_v18	
Node.js_v20
NoteStation																
PDFViewer				
Perl
PHP5.6
PHP7.0
PHP7.4	
PHP8.0		
PHP8.1		
PHP8.2		
phpMyAdmin												
Python3.9		
SnapshotReplication		
StorageAnalyzer														
SynologyDrive												
SynologyPhotos																						
TextEditor	
UniversalViewer	
VideoStation																			
VPNCenter		
WebDAVServer
WebStatio		

urqtejmi@synology_vall:/volume2/@appstore/MariaDB10$
sudo /usr/local/mariadb10/bin/mysqld restart ?
sudo systemctl restart mariadb ?

urqtejmi@synology_vall:/volume2/@appstore/MariaDB10/port_conf$ sudo cat /volume2/@appstore/MariaDB10/port_conf/MariaDB10.sc
Password:
[MariaDB10]
title=MySQL
dst.ports=”3307/tcp”
port_forward=no
desc=MariaDB 10

Editar el fitxerCD

Obrir sariaDB10.sc am l'edir de linia vi:
sudo vi /volume2/@appstore/MariaDB10/port_conf/MariaDB10.sc

Redordar (premer i per entrar al editor de linia)
i per editar
scape per sorti
:wq enter per salvar

sudo vi /volume2/@appstore/MariaDB10/port_conf/MariaDB10.sc

Per verificar contingut:

sudo vi /volume2/@appstore/MariaDB10/port_conf/MariaDB10.sc i sortie :wp