How to grants information_schema in mysql windows











up vote
1
down vote

favorite












I tried to grants information_schema but it gave me this error



first I showed my grants but nothing:



mysql> show grants for root;
ERROR 1141 (42000): There is no such grant defined for user 'root' on host '%'


then I tried to grant:



 mysql> grant select on information_schema.* to 'root'@'%' identified by   'password123';
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'identified by 'password123'' at line 1


but with show grants; :



mysql> show grants;
+-------------------------------------------------------------------------------- --------------------------------------------------------------------------------- --------------------------------------------------------------------------------- --------------------------------------------------------------------------------- -----------------------------------------------------------------------+
| Grants for root@localhost |
+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, REFERENCES, INDEX, ALTER, SHOW DATABASES, SUPER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, REPLICATION SLAVE, REPLICATION CLIENT, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, CREATE USER, EVENT, TRIGGER, CREATE TABLESPACE, CREATE ROLE, DROP ROLE ON *.* TO `root`@`localhost` WITH GRANT OPTION |
| GRANT BACKUP_ADMIN,BINLOG_ADMIN,CONNECTION_ADMIN,ENCRYPTION_KEY_ADMIN,GROUP_REPLICATION _ADMIN,PERSIST_RO_VARIABLES_ADMIN,REPLICATION_SLAVE_ADMIN,RESOURCE_GROUP_ADMIN,RESOURCE_GROUP_USER,ROLE_ADMIN,SET_USER_ID,SYSTEM_VARIABLES_ADMIN,XA_RECOVER_ADMIN ON *.* TO `root`@`localhost` WITH GRANT OPTION |
| GRANT ALL PRIVILEGES ON `testdb`.* TO `root`@`localhost` |
| GRANT ALL PRIVILEGES ON `%`.* TO `root`@`localhost` |
| GRANT PROXY ON ''@'' TO 'root'@'localhost' WITH GRANT OPTION |
+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
5 rows in set (0.00 sec)


I tried also this but with error:



mysql> GRANT ALL PRIVILEGES ON 'information_schema'.* TO 'root'@'localhost';
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''information_schema'.* TO 'root'@'localhost'' at line 1


How can I grant my information_schema?










share|improve this question
























  • Possible duplicate of How to grant all privileges to root user in MySQL 8.0
    – Solarflare
    Nov 10 at 9:59










  • @solarflare I tried all solutions in that link but didn't work with me!
    – Mohammad Khaled
    Nov 10 at 10:35










  • Your code doesn't work because MySQL 8 does not support the syntax you used anymore. The answer in that link contains the corresponding MySQL 8.0 syntax. If it does not work, please add the statements you tried and the error message you get to your question (as it should, if used correctly, work).
    – Solarflare
    Nov 10 at 11:16












  • I created a new root user and grant the table db on it and now is granted with root.
    – Mohammad Khaled
    Nov 10 at 12:24










  • but information_schema still get error...is it important to grant it if I made grant all?
    – Mohammad Khaled
    Nov 10 at 12:34















up vote
1
down vote

favorite












I tried to grants information_schema but it gave me this error



first I showed my grants but nothing:



mysql> show grants for root;
ERROR 1141 (42000): There is no such grant defined for user 'root' on host '%'


then I tried to grant:



 mysql> grant select on information_schema.* to 'root'@'%' identified by   'password123';
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'identified by 'password123'' at line 1


but with show grants; :



mysql> show grants;
+-------------------------------------------------------------------------------- --------------------------------------------------------------------------------- --------------------------------------------------------------------------------- --------------------------------------------------------------------------------- -----------------------------------------------------------------------+
| Grants for root@localhost |
+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, REFERENCES, INDEX, ALTER, SHOW DATABASES, SUPER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, REPLICATION SLAVE, REPLICATION CLIENT, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, CREATE USER, EVENT, TRIGGER, CREATE TABLESPACE, CREATE ROLE, DROP ROLE ON *.* TO `root`@`localhost` WITH GRANT OPTION |
| GRANT BACKUP_ADMIN,BINLOG_ADMIN,CONNECTION_ADMIN,ENCRYPTION_KEY_ADMIN,GROUP_REPLICATION _ADMIN,PERSIST_RO_VARIABLES_ADMIN,REPLICATION_SLAVE_ADMIN,RESOURCE_GROUP_ADMIN,RESOURCE_GROUP_USER,ROLE_ADMIN,SET_USER_ID,SYSTEM_VARIABLES_ADMIN,XA_RECOVER_ADMIN ON *.* TO `root`@`localhost` WITH GRANT OPTION |
| GRANT ALL PRIVILEGES ON `testdb`.* TO `root`@`localhost` |
| GRANT ALL PRIVILEGES ON `%`.* TO `root`@`localhost` |
| GRANT PROXY ON ''@'' TO 'root'@'localhost' WITH GRANT OPTION |
+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
5 rows in set (0.00 sec)


I tried also this but with error:



mysql> GRANT ALL PRIVILEGES ON 'information_schema'.* TO 'root'@'localhost';
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''information_schema'.* TO 'root'@'localhost'' at line 1


How can I grant my information_schema?










share|improve this question
























  • Possible duplicate of How to grant all privileges to root user in MySQL 8.0
    – Solarflare
    Nov 10 at 9:59










  • @solarflare I tried all solutions in that link but didn't work with me!
    – Mohammad Khaled
    Nov 10 at 10:35










  • Your code doesn't work because MySQL 8 does not support the syntax you used anymore. The answer in that link contains the corresponding MySQL 8.0 syntax. If it does not work, please add the statements you tried and the error message you get to your question (as it should, if used correctly, work).
    – Solarflare
    Nov 10 at 11:16












  • I created a new root user and grant the table db on it and now is granted with root.
    – Mohammad Khaled
    Nov 10 at 12:24










  • but information_schema still get error...is it important to grant it if I made grant all?
    – Mohammad Khaled
    Nov 10 at 12:34













up vote
1
down vote

favorite









up vote
1
down vote

favorite











I tried to grants information_schema but it gave me this error



first I showed my grants but nothing:



mysql> show grants for root;
ERROR 1141 (42000): There is no such grant defined for user 'root' on host '%'


then I tried to grant:



 mysql> grant select on information_schema.* to 'root'@'%' identified by   'password123';
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'identified by 'password123'' at line 1


but with show grants; :



mysql> show grants;
+-------------------------------------------------------------------------------- --------------------------------------------------------------------------------- --------------------------------------------------------------------------------- --------------------------------------------------------------------------------- -----------------------------------------------------------------------+
| Grants for root@localhost |
+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, REFERENCES, INDEX, ALTER, SHOW DATABASES, SUPER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, REPLICATION SLAVE, REPLICATION CLIENT, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, CREATE USER, EVENT, TRIGGER, CREATE TABLESPACE, CREATE ROLE, DROP ROLE ON *.* TO `root`@`localhost` WITH GRANT OPTION |
| GRANT BACKUP_ADMIN,BINLOG_ADMIN,CONNECTION_ADMIN,ENCRYPTION_KEY_ADMIN,GROUP_REPLICATION _ADMIN,PERSIST_RO_VARIABLES_ADMIN,REPLICATION_SLAVE_ADMIN,RESOURCE_GROUP_ADMIN,RESOURCE_GROUP_USER,ROLE_ADMIN,SET_USER_ID,SYSTEM_VARIABLES_ADMIN,XA_RECOVER_ADMIN ON *.* TO `root`@`localhost` WITH GRANT OPTION |
| GRANT ALL PRIVILEGES ON `testdb`.* TO `root`@`localhost` |
| GRANT ALL PRIVILEGES ON `%`.* TO `root`@`localhost` |
| GRANT PROXY ON ''@'' TO 'root'@'localhost' WITH GRANT OPTION |
+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
5 rows in set (0.00 sec)


I tried also this but with error:



mysql> GRANT ALL PRIVILEGES ON 'information_schema'.* TO 'root'@'localhost';
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''information_schema'.* TO 'root'@'localhost'' at line 1


How can I grant my information_schema?










share|improve this question















I tried to grants information_schema but it gave me this error



first I showed my grants but nothing:



mysql> show grants for root;
ERROR 1141 (42000): There is no such grant defined for user 'root' on host '%'


then I tried to grant:



 mysql> grant select on information_schema.* to 'root'@'%' identified by   'password123';
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'identified by 'password123'' at line 1


but with show grants; :



mysql> show grants;
+-------------------------------------------------------------------------------- --------------------------------------------------------------------------------- --------------------------------------------------------------------------------- --------------------------------------------------------------------------------- -----------------------------------------------------------------------+
| Grants for root@localhost |
+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, REFERENCES, INDEX, ALTER, SHOW DATABASES, SUPER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, REPLICATION SLAVE, REPLICATION CLIENT, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, CREATE USER, EVENT, TRIGGER, CREATE TABLESPACE, CREATE ROLE, DROP ROLE ON *.* TO `root`@`localhost` WITH GRANT OPTION |
| GRANT BACKUP_ADMIN,BINLOG_ADMIN,CONNECTION_ADMIN,ENCRYPTION_KEY_ADMIN,GROUP_REPLICATION _ADMIN,PERSIST_RO_VARIABLES_ADMIN,REPLICATION_SLAVE_ADMIN,RESOURCE_GROUP_ADMIN,RESOURCE_GROUP_USER,ROLE_ADMIN,SET_USER_ID,SYSTEM_VARIABLES_ADMIN,XA_RECOVER_ADMIN ON *.* TO `root`@`localhost` WITH GRANT OPTION |
| GRANT ALL PRIVILEGES ON `testdb`.* TO `root`@`localhost` |
| GRANT ALL PRIVILEGES ON `%`.* TO `root`@`localhost` |
| GRANT PROXY ON ''@'' TO 'root'@'localhost' WITH GRANT OPTION |
+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
5 rows in set (0.00 sec)


I tried also this but with error:



mysql> GRANT ALL PRIVILEGES ON 'information_schema'.* TO 'root'@'localhost';
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''information_schema'.* TO 'root'@'localhost'' at line 1


How can I grant my information_schema?







mysql






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 10 at 8:40

























asked Nov 10 at 8:16









Mohammad Khaled

368




368












  • Possible duplicate of How to grant all privileges to root user in MySQL 8.0
    – Solarflare
    Nov 10 at 9:59










  • @solarflare I tried all solutions in that link but didn't work with me!
    – Mohammad Khaled
    Nov 10 at 10:35










  • Your code doesn't work because MySQL 8 does not support the syntax you used anymore. The answer in that link contains the corresponding MySQL 8.0 syntax. If it does not work, please add the statements you tried and the error message you get to your question (as it should, if used correctly, work).
    – Solarflare
    Nov 10 at 11:16












  • I created a new root user and grant the table db on it and now is granted with root.
    – Mohammad Khaled
    Nov 10 at 12:24










  • but information_schema still get error...is it important to grant it if I made grant all?
    – Mohammad Khaled
    Nov 10 at 12:34


















  • Possible duplicate of How to grant all privileges to root user in MySQL 8.0
    – Solarflare
    Nov 10 at 9:59










  • @solarflare I tried all solutions in that link but didn't work with me!
    – Mohammad Khaled
    Nov 10 at 10:35










  • Your code doesn't work because MySQL 8 does not support the syntax you used anymore. The answer in that link contains the corresponding MySQL 8.0 syntax. If it does not work, please add the statements you tried and the error message you get to your question (as it should, if used correctly, work).
    – Solarflare
    Nov 10 at 11:16












  • I created a new root user and grant the table db on it and now is granted with root.
    – Mohammad Khaled
    Nov 10 at 12:24










  • but information_schema still get error...is it important to grant it if I made grant all?
    – Mohammad Khaled
    Nov 10 at 12:34
















Possible duplicate of How to grant all privileges to root user in MySQL 8.0
– Solarflare
Nov 10 at 9:59




Possible duplicate of How to grant all privileges to root user in MySQL 8.0
– Solarflare
Nov 10 at 9:59












@solarflare I tried all solutions in that link but didn't work with me!
– Mohammad Khaled
Nov 10 at 10:35




@solarflare I tried all solutions in that link but didn't work with me!
– Mohammad Khaled
Nov 10 at 10:35












Your code doesn't work because MySQL 8 does not support the syntax you used anymore. The answer in that link contains the corresponding MySQL 8.0 syntax. If it does not work, please add the statements you tried and the error message you get to your question (as it should, if used correctly, work).
– Solarflare
Nov 10 at 11:16






Your code doesn't work because MySQL 8 does not support the syntax you used anymore. The answer in that link contains the corresponding MySQL 8.0 syntax. If it does not work, please add the statements you tried and the error message you get to your question (as it should, if used correctly, work).
– Solarflare
Nov 10 at 11:16














I created a new root user and grant the table db on it and now is granted with root.
– Mohammad Khaled
Nov 10 at 12:24




I created a new root user and grant the table db on it and now is granted with root.
– Mohammad Khaled
Nov 10 at 12:24












but information_schema still get error...is it important to grant it if I made grant all?
– Mohammad Khaled
Nov 10 at 12:34




but information_schema still get error...is it important to grant it if I made grant all?
– Mohammad Khaled
Nov 10 at 12:34

















active

oldest

votes











Your Answer






StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");

StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














 

draft saved


draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53237202%2fhow-to-grants-information-schema-in-mysql-windows%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown






























active

oldest

votes













active

oldest

votes









active

oldest

votes






active

oldest

votes
















 

draft saved


draft discarded



















































 


draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53237202%2fhow-to-grants-information-schema-in-mysql-windows%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

鏡平學校

ꓛꓣだゔៀៅຸ໢ທຮ໕໒ ,ໂ'໥໓າ໼ឨឲ៵៭ៈゎゔit''䖳𥁄卿' ☨₤₨こゎもょの;ꜹꟚꞖꞵꟅꞛေၦေɯ,ɨɡ𛃵𛁹ޝ޳ޠ޾,ޤޒޯ޾𫝒𫠁သ𛅤チョ'サノބޘދ𛁐ᶿᶇᶀᶋᶠ㨑㽹⻮ꧬ꧹؍۩وَؠ㇕㇃㇪ ㇦㇋㇋ṜẰᵡᴠ 軌ᵕ搜۳ٰޗޮ޷ސޯ𫖾𫅀ल, ꙭ꙰ꚅꙁꚊꞻꝔ꟠Ꝭㄤﺟޱސꧨꧼ꧴ꧯꧽ꧲ꧯ'⽹⽭⾁⿞⼳⽋២៩ញណើꩯꩤ꩸ꩮᶻᶺᶧᶂ𫳲𫪭𬸄𫵰𬖩𬫣𬊉ၲ𛅬㕦䬺𫝌𫝼,,𫟖𫞽ហៅ஫㆔ాఆఅꙒꚞꙍ,Ꙟ꙱エ ,ポテ,フࢰࢯ𫟠𫞶 𫝤𫟠ﺕﹱﻜﻣ𪵕𪭸𪻆𪾩𫔷ġ,ŧآꞪ꟥,ꞔꝻ♚☹⛵𛀌ꬷꭞȄƁƪƬșƦǙǗdžƝǯǧⱦⱰꓕꓢႋ神 ဴ၀க௭எ௫ឫោ ' េㇷㇴㇼ神ㇸㇲㇽㇴㇼㇻㇸ'ㇸㇿㇸㇹㇰㆣꓚꓤ₡₧ ㄨㄟ㄂ㄖㄎ໗ツڒذ₶।ऩछएोञयूटक़कयँृी,冬'𛅢𛅥ㇱㇵㇶ𥄥𦒽𠣧𠊓𧢖𥞘𩔋цѰㄠſtʯʭɿʆʗʍʩɷɛ,əʏダヵㄐㄘR{gỚṖḺờṠṫảḙḭᴮᵏᴘᵀᵷᵕᴜᴏᵾq﮲ﲿﴽﭙ軌ﰬﶚﶧ﫲Ҝжюїкӈㇴffצּ﬘﭅﬈軌'ffistfflſtffतभफɳɰʊɲʎ𛁱𛁖𛁮𛀉 𛂯𛀞నఋŀŲ 𫟲𫠖𫞺ຆຆ ໹້໕໗ๆทԊꧢꧠ꧰ꓱ⿝⼑ŎḬẃẖỐẅ ,ờỰỈỗﮊDžȩꭏꭎꬻ꭮ꬿꭖꭥꭅ㇭神 ⾈ꓵꓑ⺄㄄ㄪㄙㄅㄇstA۵䞽ॶ𫞑𫝄㇉㇇゜軌𩜛𩳠Jﻺ‚Üမ႕ႌႊၐၸဓၞၞၡ៸wyvtᶎᶪᶹစဎ꣡꣰꣢꣤ٗ؋لㇳㇾㇻㇱ㆐㆔,,㆟Ⱶヤマފ޼ޝަݿݞݠݷݐ',ݘ,ݪݙݵ𬝉𬜁𫝨𫞘くせぉて¼óû×ó£…𛅑הㄙくԗԀ5606神45,神796'𪤻𫞧ꓐ㄁ㄘɥɺꓵꓲ3''7034׉ⱦⱠˆ“𫝋ȍ,ꩲ軌꩷ꩶꩧꩫఞ۔فڱێظペサ神ナᴦᵑ47 9238їﻂ䐊䔉㠸﬎ffiﬣ,לּᴷᴦᵛᵽ,ᴨᵤ ᵸᵥᴗᵈꚏꚉꚟ⻆rtǟƴ𬎎

Why https connections are so slow when debugging (stepping over) in Java?