MX on Linux: Difference between revisions

From Cumulus Wiki
Jump to navigationJump to search
m
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 (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 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).
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'.
 
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. TheAfter SQLyou linespress have"Enter" akey promptyou ofwill get a greaterresponse thansaying symbol"OK" (>)if whileyou thehave commandremembered linesthe havesemi-colon. aYou promptcan showingactually currentuse path. Note"\G" thator "identified by\g" isinstead followed byof a passwordsemi-colon, but here we will keep it simple enclosedand instick singleto quotessemi-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
grant all privileges on *.* to weather@localhost;
FLUSH PRIVILEGES;
create database cumulus;
exit;</pre>
 
5,838

edits

Navigation menu