On my wamp server I have a version of phpMyadmin that allow me to create trigger through the interface.
But on my server from OVH The option is not there, so I try tu update almost everything I can ( mysql, phpmyadmin ) wich now seem to be the same as my local installation. But I stil can't do that operaion.
When I compare both version there is some differences in the table informations_schema but I don't know what to do to fix that problem.
can someone help ?
phpMyAdmin only displays this option if your MySQL server supports triggers (MySQL 5.0.2 and above) and if your user is allowed to create triggers (he needs "TRIGGER" privilege). You can check your privileges by querying "SHOW GRANTS" in the SQL query box in phpMyAdmin. Maybe your provider doesn't want you to use triggers.
If your user have rights to create triggers try to use CREATE TRIGGER Syntax
Or use Devart dbForge Studio - the best tool for mysql
Related
I have hosted a website in godaddy with php/mysql/apache. Now I want to create stored procedure in mysql but find that no options in cPanel for me to do. When I just paste the create sql in cPanel SQL window, it said it need super privileges to do that. After google in the website, it said I can remote connect to godaddy mysql and create in my mysql console workbench. But when I setup in the mysql console, it said it cannot connect after test connection. What should I do? What is the correct steps to do that??
Just make sure your stored procedures are labeled as DETERMINISTIC.
This is an example of an allowed stored procedure form Godaddy help pages :
DELIMITER $$
DROP PROCEDURE IF EXISTS `spGetSouls`$$
CREATE PROCEDURE `spGetSouls`()
DETERMINISTIC
BEGIN
SELECT * FROM soul;
END$$
DELIMITER ;
CALL spGetSouls();
There might be something wrong with your account- I was able to create stored procedures on mine. In cPanel, I picked phpMyAdmin and selected on of my databases. There'll be a "Routines" tab showing. I created a new routine (type of procedure) to create a stored procedure and it saved successfully. If this isn't working for you, I'd suggest opening a support ticket
Using MySQL work bench would be the best option. You should be able to connect with the same hostname/IP that shows in cPanel. Try opening a command prompt and running the following:
telnet <cpanel_account_ip> 3306
That should be working (just tested and mine works great). If it's not, you might have a firewall rule blocking it. When you use Workbench, make sure you connect with the database user defined under the MySQL databases. You may need to associate that user with the database (which you can also do from the MySQL databases page in cPanel).
Let us know how it works out!
One of my db have tables around 10000(temporary use).
But what it has done that opening phpmyadmin become slow and my version is "2.6.0-pl2".
Because of this version I cannot use skip_db option of phpmyadmin.
So I decided to have a new user with permission to all database except one but I don't know how to do that.
So can someone tell me how to write grant to all db with skipping just one db ?
There is no need to create a user for this problem.
use show database command and you will get list of db.
In phpmyadmin version "2.6.0-pl2" , you can use show_db variable and set all tables there are your problem will be solved
Guys I'm using MySQL Workbench. Is there a way to use it to backup my database automatically?
The correct answer is There is no backup scheduling/automating option in MySQL Workbench as of 6.2. You can do manual backup in version 6.x by clicking on DataExport under Management. See below:
MySQL WorkBench Data Export Import
http://community.discountasp.net/showthread.php?t=11972
Making a backup in MySQL workbench is a pretty easy task, but it can
be hard to find exactly where to do it the first time around.
Typically when you're working in MySQL Workbench you will be using the
SQL Development section. But in order to export a backup you have to
move to the Server Administration section.
The first time through you will have to Create A New Server Instance.
If you have already set up the connection parameters in the SQL
Development section, you can just choose Take Parameters from Existing
Database Connection.
MySQL Workbench will then test the connection.
In the "Remote Management Type" dialog, select Do not use remote
management.
Create Instance Profile is just asking you for a name for the
connection. You can enter whatever you'd like here.
When you make the connection in the Server Administration section you
will see a notice that remote administration is disabled. But don't
worry, you can still make a backup of your database.
Click the Data Dump tab to access the export utility.
Check the box for the database you want to back up
Choose Export to Self-Contained File and make sure the path is correct.
Hit the Start Export button.
Edit:
I am using mysql administrator, which has schedule option. check this also:
http://www.davecolorado.com/index.php/scheduled-backup-with-mysql-administrator-on-windows/
You can use Create Event in MySql workbench to create automated backups. Sample code:
CREATE EVENT IF NOT EXISTS test_event_01
ON SCHEDULE AT CURRENT_TIMESTAMP
DO
INSERT INTO messages(message,created_at)
VALUES('Test MySQL Event 1',NOW());
Check this link for more details:
http://www.mysqltutorial.org/mysql-triggers/working-mysql-scheduled-event/
I've instaled MySQL workbench in Windows 7 64bit. Unfortunately, I'm facing problems:
In the Object Browser, when I click on my DB and right click on tables to create one, I can not insert any column (disabled) and therefore, can not insert tables. check this:
Can not create table in MySQL workbench 5.2.40
I can create table from the EER model. But even though, I faced problems when tried to connect my Java application to this database.
MySQL and Java: table doesn't exist
I have searched, and not sure from this, some of what I found is that workbench have probelms with Windows 7 - 64 bit (any idea if this is correct??). The only version I found was for 68, it installed successfully but I'm having probems.
I want to downlod MySQL server but before that: Will Mysql Server give me the same features that the workbench does? I need to work with GUI (insert, delete, update,..etc).
EDIT:
Also, the table I added using the EER are not visible in the Object browser. I only can see the schema in the Object browser without any table underneath it.
MySQL Workbench is a MySQL Server GUI. The two are different products. MySQL Workbench requires a MySQL Server connection for most tasks (except for data modeling). This reliance on a MySQL connection is clearer in the latest version of MySQL Workbench (6.1) than it was in 5.2.
MySql Workbench and MySql Server both are completely different things. MySql Server is basically a database and MySql workbench is a GUI or graphical management tool which helps us interact with MySql server database.
Similarly, SQL Server Management Studio is the graphical management tool for SQL Server.
Both are for manipulate the structure, queries and function, procedure, etc....
In Both you can Use DML and DDL
If you ask me I love Server even if you can create really cool designs on workbench, but basically you can do the same in both (insert, delete, update,..etc and more)
So it's up to you, I think MySQL server is a little bit lighter that Workbench, but if you want to, try it both.
Workbench looks like more friendly
When upgrading MySQL, I first create a backup of the database. Then I will uninstall the current version installed, and delete all the files that were left by the installer. Then I install the latest GA version, and restore the created back-up, using the MySQL Administrator.
Is there a better way of doing an upgrade of the MySQL. Because I have to create again all the users that are allowed to connect to the database.
The installation of the MySQL is used in a college enrollment system, a client server system I have developed using VB.Net and MySQL. I can only do the update at night because i know no one is connected to the database.
you can dump the mysql.user and mysql.db tables, which contains all the user info, and reimport that as well, to avoid having to recreate all that. i'd also suggest running repairs on the table after you re-import.
alternatively, you could create a listing of grants:
select concat('show grants for ',quote(user),'#',quote(host),';') from mysql.user
this will output a list of sql statements that you can then run to get specific grant statements.
ultimately though, you'll want to check out your specific version information regarding upgrades, to make sure you've considered any version specific compatibility issues.
here is some information for a 4.1 - 5.x upgrade, for example.
Why is the mysql upgrade so braindead? The fact that you need to back up all your data, install MySQL to a different directory, reimport your data -- just to upgrade is ridiculous. There has to be an easier way.