SELECT concat("Rename table ",lower(t.table_name)," to ",t.table_name , " ; " )
FROM information_schema.`TABLES` t where table_schema = "turismo" LIMIT 0,1000
Mostrando entradas con la etiqueta MYSQL. Mostrar todas las entradas
Mostrando entradas con la etiqueta MYSQL. Mostrar todas las entradas
miércoles, 25 de abril de 2012
pasar tablas de minuscula a como esten .
lunes, 25 de julio de 2011
Backup msq por consola
mysql -u nombre_usuario -p base_datos < copia_seguridad.sql
http://www.alejandroarco.es/administracion-de-sistemas/bases-de-datos/mysql-backup-con-mysqldump/
miércoles, 1 de junio de 2011
Resetear passwor root en Windows
In case you forgot the root password for your MySQL database server running under Microsoft Windows, you can still access your database and even reset your password using the command prompt. However, first you should check your my.cnf file where your password is stored.
If you are using a new version of MySQL Server, such as 5.0, the methods here might not work for you, or slightly different actions may need to be applied.
1. Stop your MySQL server completely. This can be done by accessing the Services window inside Windows XP and Windows Server 2003, where you can stop the MySQL service.
2. Open your MS-DOS command prompt using "cmd" inside the Run window. Inside it navigate to your MySQL bin folder, such as C:\MySQL\bin using the cd command.
3. Execute the following command in the command prompt: mysqld.exe -u root --skip-grant-tables
4. Leave the current MS-DOS command prompt as it is, and open a new MS-DOS command prompt window.
5. Navigate to your MySQL bin folder, such as C:\MySQL\bin using the cd command.
6. Enter "mysql" and press enter.
7. You should now have the MySQL command prompt working. Type "use mysql;" so that we switch to the "mysql" database.
8. Execute the following command to update the password:
UPDATE user SET Password = PASSWORD('NEW_PASSWORD') WHERE User = 'root';
However, you can now run any SQL command that you wish.
http://www.geekpedia.com/KB105_How-to-reset-your-MySQL-root-password-under-Windows.html
If you are using a new version of MySQL Server, such as 5.0, the methods here might not work for you, or slightly different actions may need to be applied.
1. Stop your MySQL server completely. This can be done by accessing the Services window inside Windows XP and Windows Server 2003, where you can stop the MySQL service.
2. Open your MS-DOS command prompt using "cmd" inside the Run window. Inside it navigate to your MySQL bin folder, such as C:\MySQL\bin using the cd command.
3. Execute the following command in the command prompt: mysqld.exe -u root --skip-grant-tables
4. Leave the current MS-DOS command prompt as it is, and open a new MS-DOS command prompt window.
5. Navigate to your MySQL bin folder, such as C:\MySQL\bin using the cd command.
6. Enter "mysql" and press enter.
7. You should now have the MySQL command prompt working. Type "use mysql;" so that we switch to the "mysql" database.
8. Execute the following command to update the password:
UPDATE user SET Password = PASSWORD('NEW_PASSWORD') WHERE User = 'root';
However, you can now run any SQL command that you wish.
http://www.geekpedia.com/KB105_How-to-reset-your-MySQL-root-password-under-Windows.html
miércoles, 24 de febrero de 2010
Querys raros mysql
- Devolver muchos insert para inserta los datos que no estan en una tabla a otra ( las tablas son iguales pero de distinto esquema)
FROM `TABLES` T where table_schema = 'ospelsym'
jueves, 11 de febrero de 2010
Sensibilidad a mayúsuclas y minúsculas
cambiar el parametro lower_case_table_names=1 de archivo /etc/my.cnfen la seccion [mysqld]
reiniciar mysql
y despues hacer el restor
ver que cambio la variable: show variables like 'lower%'
http://dev.mysql.com/doc/refman/5.0/es/name-case-sensitivity.html
http://dev.mysql.com/doc/refman/5.0/es/moving.html
Suscribirse a:
Entradas (Atom)