Documentos de Académico
Documentos de Profesional
Documentos de Cultura
SECURITATE
1.1 Mecanisme/ moduri de autentificare Windows Authentication
Const n conectarea la o baza de date MySql cu contul de utilizator Windows, deci nu se mai specifica parola de acces la SGBD. Este necesar cel puin MySql 5.5.13 i necesit un plug-in server-side care trebuie activat (pluginul este o extensie comerciala1 dispnibil n versiunea MySQL Enterprise Edition). Efectueaz autentificare:
CREATE USER sql_admin IDENTIFIED WITH authentication_windows AS Stoica, Administrators, "Power Users"';
This is a list of privileges that you can grant: Privilege ALL [PRIVILEGES] ALTER CREATE CREATE TEMPORARY TABLES DELETE DROP EXECUTE FILE Meaning Sets all simple privileges except GRANT OPTION Enables use of ALTER TABLE Enables use of CREATE TABLE Enables use of CREATE TEMPORARY TABLE Enables use of DELETE Enables use of DROP TABLE Not implemented Enables use of SELECT ... INTO OUTFILE and LOAD DATA INFILE Enables use of CREATE INDEX and DROP INDEX Enables use of INSERT Enables use of LOCK TABLES on tables for which you have the SELECT privilege Enables the user to see all processes with SHOW PROCESSLIST Not implemented
PROCESS REFERENCES
http://dev.mysql.com/doc/refman/5.6/en/windows-authentication-plugin.html
Enables use of FLUSH Enables the user to ask where slave or master servers are Needed for replication slaves (to read binary log events from the master) Enables use of SELECT SHOW DATABASES shows all databases Enables use of MySQLadmin shutdown Enables use of CHANGE MASTER, KILL, PURGE MASTER LOGS, and SET GLOBAL statements, the MySQLadmin debug command; allows you to connect (once) even if max_connections is reached Enables use of UPDATE Synonym for privileges Enables privileges to be granted
SUPER
Refresh FLUSH PRIVILEGES; GRANT [type of permission] ON [database name].[table name] TO [username]@'localhost; REVOKE [type of permission] ON [database name].[table name] TO [username]@localhost; DROP USER demo@localhost;
CREATE TABLE Produse ( IdProdus SMALLINT UNSIGNED ZEROFILL NOT NULL AUTO_INCREMENT, NumeProdue VARchAR(40) NOT NULL, Pret DECIMAL(10,2) NULL, PRIMARY KEY (IdProdus) ); select * from produse
Summary: in this tutorial, we will introduce you to some very useful statements that allow you to maintain database tables in MySQL. MySQL provides several useful statement that allows you to maintain database tables effectively. Those statements enable you to analyze, optimize, check, and repair database tables.
If there is no change to the table since the ANALYZE TABLE statement ran, MySQL will not analyze the table again. If you run the above statement again: ?
1
ANALYZE TABLE payments
It is recommended that you execute this statement for the tables that are updated frequently. For example, if you want to optimize the orders table to defragment it, you can perform the following statement: ?
1
OPTIMIZE TABLE orders
?
1
CHECK TABLE table_name
The CHECK TABLE statement checks both table and its indexes. For example, you can use the CHECK TABLE statement to check the orders table as follows: ?
1
CHECK TABLE orders
The CHECK TABLE statement only detects problems in a database table but it does not repair them. To repair the table, you use the REPAIR TABLE statement.
Suppose there are some errors in the orders table and you need to fix them, you can use the REPAIR TABLE statement as the following query: ?
1
REPAIR TABLE employees
MySQL returns what it has done to the table and shows you whether the table was repaired or not.