MX on Linux: Difference between revisions

923 bytes added ,  06:41, 4 October 2020
m
Line 585: Line 585:
We need to create a user for PhpMyAdmin (or adMiner or whatever) to access our database and another for Cumulus to use to access the database tables. At the moment our database access has the single root@localhost user we created when we installed MariaDB.  The initial password was set then, and we need to use it to get access to MariDB monitor where we can insert some SQL commands to create these two users.  
We need to create a user for PhpMyAdmin (or adMiner or whatever) to access our database and another for Cumulus to use to access the database tables. At the moment our database access has the single root@localhost user we created when we installed MariaDB.  The initial password was set then, and we need to use it to get access to MariDB monitor where we can insert some SQL commands to create these two users.  


PhpMyAdmin on first start up will ask for username and password, thereafter it will use same log-in (by default you see log-in screen each time you restart or if it is left idle for a long time), let us create a user called 'admin' for it.  
PhpMyAdmin on first start up will ask for username (here I choose "admin") and password, thereafter it will use same log-in (by default you see log-in screen each time you restart or if it is left idle for a long time), let us create a user called 'admin' for it.  


The user name and password for the data base is set in MX using the [[MX_Administrative_Interface#MySQL_settings|MySQL_settings]] in the admin interface, for it let us create a user called 'weather'.  
The database name (here I choose "cumulus" for the data base name), user name (here I choose "weather" for the user name), and password, must all match those set in MX using the [[MX_Administrative_Interface#MySQL_settings|MySQL_settings]] in the admin interface. You could of course use PhpMyAdmin  (or AdMiner) to create additional user names, and to create the database, but I assume all is done in the following bit of SQL.  Remember, the Windows operating system is not case sensitive, but all Linux based operating systems are case sensitive (so whatever pattern of capitals and lowercase you choose must be used every time.  Also all names must start with a letter, can contain only letters or digits (no punctuation), and must not be a reserved word ("password" is a reserved word, so you cannot use that for a password, nor for a column name).


Obviously, these names might not be what you use, but you can amend commands below accordingly. For each line with SQL, it must end with a semicolon (;) as shown.  The SQL lines have a prompt of a greater than symbol (>) while the command lines have a prompt showing current path. Note that "identified by" is followed by a password enclosed in single quotes.
Obviously, these names might not be what you use, but you can amend commands below accordingly. For each line with SQL, it must end with a semicolon (;) as shown.  After you press "Enter" key you will get a response saying "OK" if you have remembered the semi-colon. You can actually use  "\G" or "\g" instead of a semi-colon, but here we will keep it simple and stick to semi-colon.
 
The SQL lines have a prompt of a greater than symbol (>) while the command lines have a prompt showing current path. Note that "identified by" is followed by a password enclosed in single quotes.


<pre>sudo mysql --user=root --password=InitialPassword
<pre>sudo mysql --user=root --password=InitialPassword
Line 597: Line 599:
grant all privileges on *.* to weather@localhost;
grant all privileges on *.* to weather@localhost;
FLUSH PRIVILEGES;
FLUSH PRIVILEGES;
create database cumulus;
exit;</pre>
exit;</pre>


5,838

edits