You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- There is no predefined database, so you should create your own.
38
-
- The `app`user is the local superuser. This means you can (among other things):
39
-
-Can create your own databases;
40
-
- Create users;
38
+
- The `app`user is the local superuser. This means you can (among other things):
39
+
-Create your own databases;
40
+
- Create users and manage passwords;
41
41
- Define views and triggers.
42
-
- If you want to use a GUI to work on your database we recommend using a local GUI ([HeidiSQL](../../best-practices/database/how-to-use-heidisql-on-hypernode.md)) instead of an online GUI ([PHPMyAdmin](../mysql/how-to-use-phpmyadmin.md)).
42
+
- If you want to use a GUI to work on your database we recommend using a local GUI (Such as [HeidiSQL](../../best-practices/database/how-to-use-heidisql-on-hypernode.md) on Windows) instead of an online GUI ([PHPMyAdmin](../mysql/how-to-use-phpmyadmin.md)).
43
43
44
44
## Whitelisting Your IP Address
45
45
46
-
Port 3306 is fire-walled on all Hypernodes to prevent hackers and bruteforces from connecting to your MySQL instance. That's why if you want to externally connect to MySQL on the Hypernode, you’ll need to add a whitelisting entry first.
46
+
Port 3306 is firewalled on all Hypernodes to prevent hackers and bruteforces from connecting to your MySQL instance. That's why if you want to externally connect to MySQL on the Hypernode, you’ll need to add the remote IP address to the allowlist first.
47
47
48
-
### Whitelist via the hypernode-systemctl CLI Tool
48
+
### Allow an IP via the hypernode-systemctl CLI tool
49
49
50
50
First check which IP addresses have been whitelisted already, if any.
51
51
52
52
```console
53
53
hypernode-systemctl whitelist get
54
54
```
55
55
56
-
### Adding to Whitelist
56
+
### Adding to the Allowlist
57
57
58
-
To add more values to your whitelists you can run the following. Please note that descriptions are optional:
58
+
To add more values to your allowlist you can run the following. Please note that descriptions are optional:
59
59
60
60
```console
61
-
hypernode-systemctl whitelist add database 1.2.3.4 --description "my description"
61
+
hypernode-systemctl whitelist add database 203.0.113.4 --description "my description"
62
62
```
63
63
64
-
### Removing From Whitelist
64
+
### Removing From the Allowlist
65
65
66
-
To remove values from your whitelists you can run the following:
66
+
To remove IP addresses from your allowlists you can run the following:
It's also possible to whitelist an IP address via the Control Panel
75
75
@@ -98,16 +98,18 @@ Use your credentials to connect like so:
98
98
mysql --host=mysqlmaster.example.hypernode.io --user=app --password=mypassword
99
99
```
100
100
101
+
Please note you will need to add the remote host's IP address to the allowlist first, as described above.
102
+
101
103
### Using HeidiSQL/PHPMyAdmin to Connect to MySQL
102
104
103
105
Read the following articles on how to use both HeidiSQL and PHPMyAdmin for Hypernode:
104
106
105
-
- Using HeidiSQL
106
-
- Using PHPMyAdmin
107
+
- Using [HeidiSQL](../../best-practices/database/how-to-use-heidisql-on-hypernode.md
108
+
- Using [PHPMyAdmin](../mysql/how-to-use-phpmyadmin.md)
107
109
108
110
### Using an SSH Tunnel to Circumvent Firewalls
109
111
110
-
If you are blocked by a firewall, you can tunnel the remote MySQL service to your local computer (Mac or Linux).
112
+
If you are blocked by a firewall, you can create a temporary tunnel between the remote MySQL service and your local computer.
111
113
112
114
Use this command:
113
115
@@ -154,15 +156,15 @@ You should consider using Magerun (see above), but you could use HeidiSQL to cre
154
156
155
157
Hypernode offers several version of MySQL to be able to meet te requirements of several Magento, Shopware and Akeneo versions. For example, if you want to install Magento 2.4, you'd have to run MySQL 5.7 or 8.0.
156
158
157
-
To upgrade your MySQL version you can use[the hypernode-systemctl tool](../tools/how-to-use-the-hypernode-systemctl-cli-tool.md#mysql) through the command line.
159
+
To upgrade your MySQL version you can use[the hypernode-systemctl tool](../tools/how-to-use-the-hypernode-systemctl-cli-tool.md#mysql) through the command line.
To create a new database, we’ll login using the MySQL client and drop the database using the command line.
167
+
To create a new database, we’ll login using the MySQL client and create the database using the command line.
166
168
167
169
```bash
168
170
DATABASE="new_database"
@@ -179,7 +181,7 @@ To prevent incorrect deletion of database that are still in use, ensure yourself
179
181
180
182
- The database is not used anymore by checking it’s content.
181
183
- The database is not defined in your application configuration anymore.
182
-
(IE: Check the `local.xml`and/or your `wp-config.php).`
184
+
(IE: Check the `local.xml`, `env.php`, and/or your `wp-config.php).
183
185
- You created a backup to ensure yourself you are able to restore the database if necessary.
184
186
185
187
When you are 100% sure it is safe to delete the database, issue the following command:
@@ -204,70 +206,64 @@ TABLE="core_url_rewrite"
204
206
mysql "$DATABASE" -e "TRUNCATE TABLE $TABLE"
205
207
```
206
208
207
-
### Changing Your MySQL 5.6 Password
209
+
## Changing Your Password
210
+
211
+
How you change the database password depends on what version of MySQL you are running on your Hypernode.
212
+
213
+
### Changing Your Password on MySQL 5.6
208
214
209
215
Login to your MySQL server via the following command:
210
216
211
217
```console
212
218
mysql
213
219
```
214
220
215
-
This will get you into the MySQL prompt. Now change the password for a given user account using this command:
221
+
This will get you into the MySQL prompt. In this example we change the password for the `app` user to `p4ssw0rd`
216
222
217
223
```mysql
218
-
update user set password=PASSWORD('newpassword') where user='username';
224
+
SET PASSWORD FOR 'app'@'%'= PASSWORD("p4ssw0rd");
219
225
```
220
226
221
-
Let’s assume here that your username is ‘trial’ and your new password is ‘hypernode’. Your actual command would look like this:
227
+
Your password has been updated. There’s no need to restart the MySQL demon. Exit the MySQL with
222
228
223
229
```mysql
224
-
update user set password=PASSWORD('hypernode') where user='trial';
230
+
exit;
225
231
```
226
232
227
-
Now your password is changed in the database, but they haven’t filtered into memory yet. Change that by typing:
233
+
### Changing Your Password on MySQL 5.7
228
234
229
-
```mysql
230
-
flush privileges;
235
+
Login to your MySQL server via the following command
236
+
237
+
```console
238
+
mysql
231
239
```
232
240
233
-
Your password has been updated. There’s no need to restart the MySQL demon. Exit the MySQL with
241
+
This will get you into the MySQL prompt. In this example we change the password for the `app` user to `p4ssw0rd`
234
242
235
243
```mysql
236
-
exit;
244
+
ALTERUSER`app` IDENTIFIED BY 'p4ssw0rd';
237
245
```
238
246
239
-
## How to Upgrade Your MySQL Version
240
-
241
-
### Upgrading to MySQL 5.7
242
-
243
-
**Please note that once you have upgraded the MySQL version on your Hypernode, you won't be able to downgrade it.**
244
-
245
-
You can upgrade the MySQL version on your Hypernode from 5.6 to 5.7 with the following command:
247
+
Your password has been updated. There’s no need to restart the MySQL demon. Exit the MySQL with
246
248
247
-
```bash
248
-
hypernode-systemctl settings mysql_version 5.7
249
+
```mysql
250
+
exit;
249
251
```
250
252
251
-
You can then check with `livelog` when the process has finished and your MySQL version has been upgraded.
253
+
Remember to update your `~/.my.cnf` with your new password so you could easily login your MySQL-CLI without entering the password each time.
252
254
253
-
### Changing Your MySQL 5.7 Password
255
+
### Changing Your Password on MySQL 8.0
254
256
255
257
Login to your MySQL server via the following command
256
258
257
259
```console
258
260
mysql
259
261
```
260
262
261
-
This will get you into the MySQL prompt. Now change the password for a given user account using this command, in this case the `app` user:
263
+
This will get you into the MySQL prompt. In this example we change the password for the `app` user to `p4ssw0rd`
262
264
263
265
```mysql
264
-
update user set authentication_string=password('newpassword') where user='app';
265
-
```
266
-
267
-
Now your password is changed in the database, but they haven’t filtered into memory yet. Change that by typing:
268
-
269
-
```mysql
270
-
flush privileges;
266
+
ALTERUSER`app` IDENTIFIED BY 'p4ssw0rd';
271
267
```
272
268
273
269
Your password has been updated. There’s no need to restart the MySQL demon. Exit the MySQL with
@@ -278,11 +274,25 @@ exit;
278
274
279
275
Remember to update your `~/.my.cnf` with your new password so you could easily login your MySQL-CLI without entering the password each time.
280
276
277
+
## How to Upgrade Your MySQL Version
278
+
279
+
### Upgrading to MySQL 5.7
280
+
281
+
**Please note that once you have upgraded the MySQL version on your Hypernode, you won't be able to downgrade it.**
282
+
283
+
You can upgrade the MySQL version on your Hypernode from 5.6 to 5.7 with the following command:
284
+
285
+
```console
286
+
hypernode-systemctl settings mysql_version 5.7
287
+
```
288
+
289
+
You can then check with `livelog` when the process has finished and your MySQL version has been upgraded.
290
+
281
291
### Upgrading to MySQL 8.0
282
292
283
293
**Please note that once you have upgraded the MySQL version on your Hypernode, you won't be able to downgrade it.**
284
294
285
-
Before you can upgrade to MySQL 8.0 you first need to upgrade the MySQL version to 5.7 and wait for this process to finish. Once You can upgrade the MySQL version on your Hypernode from 5.7 to 8.0 with the following command:
295
+
Before you can upgrade to MySQL 8.0 you first need to upgrade the MySQL version to 5.7 and wait for this process to finish. Once that is done, you can upgrade the MySQL version on your Hypernode from 5.7 to 8.0 with the following command:
0 commit comments