GreenLake Administration
- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- msyql - scripting
Operating System - HP-UX
1849516
Members
6876
Online
104044
Solutions
Forums
Categories
Company
Local Language
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Forums
Discussions
back
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-01-2010 08:00 PM
12-01-2010 08:00 PM
msyql - scripting
Hi there
I want to do this from a script:
mysql -u root
GRANT ALL ON *.* TO 'xxx'@'localhost'IDENTIFIED BY 'xxx';
quit;
If I just stick "mysql -u root" inside a script then it opens mysql and wait's for user interaction. I need to grant the permissions for a certain user and move to other commands.
Reagrds
I want to do this from a script:
mysql -u root
GRANT ALL ON *.* TO 'xxx'@'localhost'IDENTIFIED BY 'xxx';
quit;
If I just stick "mysql -u root" inside a script then it opens mysql and wait's for user interaction. I need to grant the permissions for a certain user and move to other commands.
Reagrds
Jesus is the King
- Tags:
- mysql
1 REPLY 1
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-01-2010 10:56 PM
12-01-2010 10:56 PM
Re: msyql - scripting
The construct you are looking for is something like this :
...
other commands here
...
mysql -u root < GRANT ALL ON *.* TO 'xxx'@'localhost'IDENTIFIED BY 'xxx';
quit;
EOF
...
more commands here
...
hope this helps
...
other commands here
...
mysql -u root <
quit;
EOF
...
more commands here
...
hope this helps
________________________________
UNIX because I majored in cryptology...
UNIX because I majored in cryptology...
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
Company
Events and news
Customer resources
© Copyright 2026 Hewlett Packard Enterprise Development LP