background preloader

Mysql

Facebook Twitter

Travaux   2doc. 2doc. DbNinja - Une alternative sérieuse à phpMyAdmin pour MySQL. DbNinja est une plateforme PHP gratuite permettant de gérer de manière avancée vos bases de données MySQL à travers une interface complète et intuitive. Lorsque vous montez un serveur web avec une BDD MySQL, vous avez le réflexe d'installer phpMyAdmin pour gérer cette dernière. Mais sachez qu'il existe désormais une bonne alternative à la fameuse plateforme: DbNinja. Avec une interface plutôt différente, DbNinja propose un ensemble de fonctionnalités pour gérer vos bases, entre autre: Gestion des BDD, des tables et évènementsGestion des indices, clés étrangères et triggersModification des procédures, fonctions et vuesGestion des utilisateurs et privilègesOptimisation et réparation des tablesBackup et restauration de bases et donnéesExport des donnéesGestion des connexions actives sur le serveurGestion des valeurs système de la baseEtc.

L'interface est multilingue et vous permettra même de modifier des procédures stockées, le tout avec coloration syntaxique... Site Officiel. Top 10 MySQL GUI Tools. Many third parties create rich applications to facilitate database management, database development and database administration. Here are ten outstanding graphical interfaces for MySQL. Most relational databases, with the notable exception of MS Access, are comprised of two distinct components: the back-end, where the data is warehoused, and the front-end, a user interface for communicating with the data component. This type of design is quite clever, as it parallels the two-tier programming model that separates the data layer from the user interface and allows the makers of the database software focus on their product's strongest suit: data storage and management.

It also opens the door for third parties to create rich applications to interact with various databases. Such products include Embarcadero Rapid SQL and Oracle SQL Developer. Here are ten outstanding graphical interfaces for MySQL. 1. 2. Manufacturer: PremiumSoft ™ CyberTech Ltd. A 30-day trial version is available. 3. 4. 6. Cracker un mot de passe MySQL. Cracker un mot de passe MySQL Si vous avez perdu votre mot de passe MySQL ou que vous avez besoin de pentester le machin, il existe un petit soft qui s'appelle MysqlPasswordAuditor qui va vous sauver la vie.

Cet outil utilise une méthode d'attaque par dictionnaire et vous permettra par exemple de vérifier si vos serveurs MySQL ne présentent pas quelques faiblesses en ce qui concerne la solidité des mots de passe. MySQLPasswordAuditor fonctionne uniquement sous Windows et dispose d'une interface graphique limpide. Bref, un petit outil à rajouter à votre boite à outil de hacker.

Si vous connaissez des équivalents qui tournent sur d'autres OS que Windows, je suis preneur. A télécharger ici. Edit : Et en bonus un petit script bash qui fait exactement la même chose. . #! Source Vous avez aimé cet article ? Five simple ways to tune your LAMP application. Mysql tips | nordbeastie. Méthodes de suppression des index inutiles « dbnewz.

Les vacances étant terminées, nous allons boucler notre tour de vue des index inutiles en voyant quels outils vont nous aider à découvrir les index qui peuvent être supprimés. Le dernier article présentait en effet des indications qui fonctionnent généralement bien mais qui ont l’inconvénient de demander beaucoup de travail manuel et de laisser de côté tout un pan d’index qui peuvent être inutiles : ceux qui ne sont pas en doublon ni redondants, qui n’ont pas une cardinalité faible mais qui ne sont tout simplement pas utilisés par l’application. Idée générale Si vous avez bien lu l’article précédent, vous avez probablement remarqué que la principale difficulté est qu’il n’existe quasiment jamais de règle absolue permettant de savoir à coup sûr qu’un index est inutile (exception notable : les index en doublon repérés par mk-duplicate-key-checker et qui peuvent être supprimés dans 99% des cas sans problème).

Index_statistics Un petit exemple sur des données réelles ? Mk-index-usage. 101 Tips to MySQL Tuning and Optimization at Monitor.Us Free Monitoring. MySQL is a powerful open-source database. With more and more database driven applications, people have been pushing MySQL to its limits. Here are 101 tips for tuning and optimizing your MySQL install.

Some tips are specific to the environment they are installed on, but the concepts are universal. I have divided them up into several categories to help you with getting the most out of MySQL: MySQL Server Hardware and OS Tuning: 1. MySQL Configuration: 25. MySQL Schema Optimization: 40. Query Optimization: 63. MySQL Backup Procedures: 87. And finally 101: Perform MySQL monitoring: Monitis Unveils The World’s First Free On-demand MySQL Monitoring. For key MySQL health metrics also look at our white paper: The Monitis Internal MSQL Server Monitoring Monitis is an all-in-one hosted systems monitoring platform for small and medium-sized businesses. 70,000 sysadmins and IT managers use Monitis platform to monitor their websites, applications and networks.

MEET-UP SkySQL 20 avril - AL'X COMMUNICATION. 7.9.3 How MySQL Uses Threads for Client Connections. MySQL Partitioning: A Flow Chart | Tokutek. Recovering Innodb table Corruption. Assume you’re running MySQL with Innodb tables and you’ve got crappy hardware, driver bug, kernel bug, unlucky power failure or some rare MySQL bug and some pages in Innodb tablespace got corrupted. In such cases Innodb will typically print something like this: InnoDB: Database page corruption on disk or a failed InnoDB: file read of page 7. And crash with assertion failure.

So what can you do to recover such a table ? There are multiple things which can get corrupted and I will be looking in details on the simple one in this article – when page in clustered key index is corrupted. In this example I actually went ahead and manually edited test.ibd file replacing few bytes so corruption is mild. First I should note CHECK TABLE in INNODB is pretty useless.

First run is check table in normal operation mode – in which case Innodb simply crashes if there is checksum error (even if we’re running CHECK operation). You may think why do not you simply rebuild table by using OPTIMIZE TABLE ? Ways to repair MYSQL Databases. 8.7 Utiliser mysqlcheck pour l'entretien et la réparation.

Tunning MySQL InnoDB performance. Tunning MySQL InnoDB storage engine is not an easy task. It’s more like a game where you set mini goals and then try to find the right value and achieve them. Playing with the InnoDB variables is an art where you have to check your performance results each time you change a configuration parameter. The start point of this game is your MySQL my.cnf file. The optimal configuration depends on your hardware and on the type of workload you are running. I played a few days with the configs and it was really helpful to see a performance gain at the end of the game.

So I am sharing here some helpful commands and links that can save me some time in the next level of the game. MySQL Innodb Only Memory-related variables: - innodb_buffer_pool_size – Set the amount of memory allocated to both Innodb data and index buffer cache. Configure an Optimum Number of User Threads: MySQL is a single-process, multithreaded application. Examples of MySQL options: If InnoDB is disabled: /etc/init.d/mysql stop. MySQL show status - show open database connections | Show MySQL open database connection. By Alvin Alexander. Last updated: Nov 20, 2013 MySQL "show status" FAQ: Can you demonstrate how to use the MySQL show status command to show MySQL variables and status information, such as the number of open MySQL connections?

I don't have a whole lot of time today to give this a detailed discussion, but here is a quick look at some MySQL work that I did recently to show MySQL open database connections. MySQL show status - Open database connections You can show MySQL open database connections (and other MySQL database parameters) using the MySQL show status command, like this: All those rows and values that are printed out correspond to MySQL variables that you can look at.

MySQL show processlist Here's what my MySQL processlist looks like when I had my Java application actively running under Tomcat: And here's what it looked like after I shut Tomcat down: As a final note, you can also look at some MySQL variables using the mysqladmin command at the Unix/Linux command line, like this: Mémo - MySql, PHP, RvDevsign. Installer et configurer MySQL sur Debian. Bien qu'il décrive une procédure relativement commune, ce manuel vous permettra d'installer rapidement un Mysql disposant d'une sécurité minimum sur Debian 4.0 Etch ou 5.0 Lenny. Cet article a été testé sur les distributions suivantes : Debian 4.0 EtchDebian 5.0 LennyDebian 6.0 Squeeze Cet article nécessite que vous soyez identifié en tant que super utilisateur root. Cela peut se faire par la commande : su - Installation En premier lieu, il vous faut installer le serveur MySQL et un logiciel capable de créer des mots de passes : DEBIAN_FRONTEND='noninteractive' command apt-get install mysql-server apg Nous générons le mot de passe root de MySQL : MYSQL_PASSWORD="$(command apg -q -a 0 -n 1 -M NCL)" Nous affichons le nouveau mot de passe : command echo "Votre mot de passe pour l'utilisateur root de MySQL sera : '${MYSQL_PASSWORD}'.

" Attention: Notez la valeur affichée et conservez la précieusement ! Nous mettons en place le nouveau mot de passe : Votre serveur MySQL est maintenant prêt à être utilisé. Virtual IP Addresses and Their Discontents for Database Availability. Virtual IP addresses or VIPs are commonly used to enable database high availability. A standard failover design uses an active/passive DBMS server pair connected by replication and watched by a cluster manager. The active database listens on a virtual IP address; applications use it for database connections instead of the normal host IP address. Should the active database fail, the cluster manager promotes the passive database server and shifts the floating IP address to the newly promoted host. Application connections break and then reconnect to the VIP again, which points them to the new database. Virtual IP addresses are enticing because they are completely transparent to applications--no changes to database API behavior, no changes to connection strings, etc.

While virtual IP addresses seem simple, they depend on arcane TCP/IP behavior that is not especially well understood and not always consistent across different TCP/IP implementations. What is a Virtual IP Address? # arp -an ? Passer de MySQL à MariaDB. Mise à jour 16/10/2011: Dans la première version j’utilisais l’ancienne version stable de MariaDB (5.1), suite au commentaire de Guillaume je l’ai mis à jour pour utiliser la version 5.2.

Depuis quelques temps, Oracle ne se sent plus pisser: Ils rachètent Sun, ils ferment les sources des logiciels qu’ils possèdent, ils font des procès pour gagner des thunes,… Ils ont tué OpenOffice. Ils vont tuer Java. Donc quand ils ont acheté MySQL, les libristes l’avaient mauvaise. Ça n’a pas tardé d’ailleurs, la semaine dernière ils ont annoncé la sortie d’extensions « closed sources » pour MySQL. Heureusement, le libre est un monde capable de grandes choses (quand les gens ne passent pas leur temps à se troller et à forker pour des raisons d’ego) et un dérivé de MySQL a vu le jour: MariaDB. En fait comme pour LibreOffice, ce sont de nombreux développeurs du logiciel d’origine qui sont parti continuer leur boulot ailleurs, loin d’Oracle.

Sudo apt-get install mariadb-server mariadb-client Terminé ! Tips, Suggestions, and Findings: How to Log User Connections in MySQL. There is nothing that MySQL 5.1 explicitly performs to log user connections, but there is a combination of MySQL commands that can log user connections without having to turn on the general query log. I repeat: you do not have to turn the general query log on to make this work! Would you like to find out what that is? Ingredients init-connect See it coming together?

Alrighty, here's the recipe... Assumptions: The name of the database we will use to store this information will be called admin. 1. CREATE TABLE admin.connections (id INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY, connect_time DATETIME NOT NULL, user_host VARCHAR(50) NOT NULL, connection_id INT UNSIGNED NOT NULL); 2. SET GLOBAL init_connect = "INSERT INTO admin.connections (connect_time, user, connection_id) VALUES (NOW(), CURRENT_USER(), CONNECTION_ID());"; 3. 4. 5. SPAM - ClissXXI. De ClissXXI. [modifier] Principes et problèmes du SPAM Le mail circule via Internet via le protocole protocole SMTP et en se basant sur IP et DNS.

Le problème: il n'y a aucune identification, et envoyer du courriel est pour ainsi dire gratuit, par conséquent toute boîte au lettre peut être remplie de spam par n'importe qui, sans la contrainte de coût du courrier postal. Depuis plusieurs années, à mesure que ce phénomène gagne en puissance, diverses solutions ont été mises en oeuvre. Pour résumer, aucune ne fonctionne vraiment bien, et aucune n'est réellement sans douleur. On cherchera, au passage, des solutions qui permettront de filtrer à coup quasi-sûr un spam, de manière à réaliser ce filtrage en amont, épargnant cette peine à l'utilisateur de notre service de courriel, et d'autre part afin d'éviter de devoir vérifier ce filtrage manuellement, au cas où le filtre aurait filtré un bon message ("false-positive"). [modifier] Principes de combat [modifier] Les bases [modifier] Listes noires. Shinguz's Blog (en): MySQL Cluster - Cluster circular replication with 2 replication channels | Partager sur LinkedIn.

10 things in MySQL (that won't work as expected). (I just discovered cracked.com) #10. Searching for a NULL 2.FROM a 3.WHERE a.column = NULL In SQL, a NULL is never equal to anything, even another NULL. This query won't return anything and in fact will be thrown out by the optimizer when building the plan. When searching for NULL values, use this instead: 3.WHERE a.column IS NULL #9. 4. b 5.ON b.a = a.id 6.WHERE b.column = 'something' A LEFT JOIN is like INNER JOIN except that it will return each record from a at least once, substituting missing fields from b with NULL values, if there are no actual matching records.

The WHERE condition, however, is evaluated after the LEFT JOIN so the query above checks column after it had been joined. Essentially, this query is an INNER JOIN, only less efficient. To match only the records with b.column = 'something' (while still returning all records from a), this condition should be moved into ON clause: 6. . #8. Quite often I see the queries like this: 2.FROM b 3.WHERE b.column < 'something' 4. . #7. 3.JOIN b 5. . #6. MyTAP. 30 questions sur MySQL – Réponses de la partie 1 « dbnewz. Et voici comme promis les réponses de la 1ère partie du quiz. Dans la mesure du possible, j’ai ajouté quelques petits commentaires pour expliquer le pourquoi du comment. 1- b : Toutes les ressources doivent etre étanches entre les instances 2- a : MyISAM garde dans ses méta-données le nombre de lignes de la table 3- b : InnoDB remplit d’abord le 1er fichier, puis le 2nd, on ne peut pas parler de distribution des écritures 4- c : Certains changements de droits n’affectent pas les sessions déjà ouvertes 5- a : Le tablespace principal contient des informations indispensables au bon fonctionnnement d’InnoDB, meme avec innodb_file_per_table 6- c : La réplication ne constitue pas une sauvegarde 7- a : Depuis MySQL 5.1 et la fonctionnalité de plugins, les versions d’InnoDB peuvent sortir indépendamment des versions de MySQL 8- b : En général, MySQL n’utilise qu’un seul index par table et par requete, un index multi-colonnes est donc souvent le plus efficace 9- c 11- c Mots-clefs : MySQL, pratique.