Connecting to MariaDB on Synology NAS

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
today we are installing varietyb we are installing uh it on a Synology Nas and we're connecting to it remotely [Music] hey everybody this is Tom with Tom's Tech show and I do have a Thomas talk show I get kind of mixed up when I'm alternating videos I'm doing one of those one of these one of those a short something else it gets you know you got to have multiple jobs and be able to balance things and bounce around so um I do have a video today for you that is I have a Synology Nas I'm like I need to have a database in order to connect things do things you know do development and and all that I need a place to put some data to keep track of it and and maintain that so I go hey I've got Synology now sitting right in the other room and I can use that I can install my idb on it and uh now you can once you get it installed on there you can't access it remotely it comes in kind of a lockdown only applications built onto and running on the Synology and ask and typically access that database which is a good security thing to start with but um so we want to be able to set up and do some configuration to get a user in order to jump on that and do that remotely through a Heidi SQL or some other tool like that so here we have our Synology Nas and we'll just log in here real quick okay now if you're familiar with the Synology Nas uh you know it's got a lot of fun tools and things that you can use in order to you know do a bunch of different things so I can go here to the package Center and say hey I want to install a package I have all my packages that I've already installed to do numerous things but I want to install something like DB oh and there is a package so this makes it very easy to do you just click the install button it's going to ask me where to put it downloading and we're going to get in here to a point where I can tell it where to install so I have two volumes volume one is a SATA drive so that's fairly slower but there's a lot of space there's you know like I think it starts at 16 or 17 terabytes so that would be good for space but I'm not going to be using that much space I'm not going to be storing a lot of images and everything this is just for for data so volume two on my Synology analysis is just how I have it set up yours will probably be different Volume 2 I know of is all ssds so I know that's good I'm going to want it on the fastest drives that I've got okay we need to create a new root password which will be so it needs to be middle strength 10 characters must include mixed case numeric characters and special characters so we need to do that so I can type okay okay so it accepted my password we can have it run of course after installation done and now it's going to load and install and be there waiting for it okay now we've got it installed I can click open which only lets me do a few things okay so it could let me change the root pass change the password reset the root password or reset the entire database back to default so um this does this doesn't allow me to do anything like create a database or do anything it's just a simple little uh utility panel here but what I do want to do is say enable TCP IP connections so this is going to allow me to remotely connect to it at some point okay so let's click that let's click apply and we should be getting the okay now we've got remote connections so but if I come here I go new this is on my home Nas and root save my root database I click save we're going to name it uh rename Tom's techdb and try and click open now this is going to be here waiting waiting saying hey you cannot connect to that because your system is not allowed so what do we do well we need to come back here to our Synology Nas go to our control panel open up terminal SNMP and enable SSH so this allows to connect in to the box and to run some commands so click apply yes I know I need to if I this is the message it gives you you know if you destroy some of the system files since you're going to be in at the root level that you probably don't want to be deleting things that are bad but we know what we're doing so we're going to do that okay so now we have SSH enabled now when I get done with all these commands it's obviously some a good idea to go back and uh disable SSH so that uh nobody can get into your system or anything at any time so now what we want to do we're going we have that and we're going to SSH and then we're going to do a username at home Nas so we want to be able to put in the user before the name of the white it takes the default user of the system that you're running and sometimes that just doesn't work okay so now it's going to say hey we're establishing an SSH connection do we want to connect and use this fingerprint we're going to say yes we do now then we need my password and boom now we are down here at the home Nas command prompt and we can see it's very linuxy it's got all the nice fun Linux things so that we can do all kinds of Linux ish stuff so the one thing that we want to do is of course do a uh run the command MySQL Dash root Dash u space root space p so that we can enter our password hopefully I did that right I did now we have a database we have we're connected to our database so I need to be able to first thing we need to do is select a table to use in order to edit users it kind of works that way so I'm going to use we're going to go use MySQL and I always forget I typically always forget to put that little uh semicolon after all the commands so if I'm hitting things and wondering like why is that not working oh yeah I got to put a semicolon after so so I can check and see what's here right now select user comma host from user semicolon and then boom that gives me my list of users so all of these users root can access the 127001 which is local and the root IPv6 colon colon 1 and then the hostname localhost that's all local stuffs okay now we see the users here now we want to add a user so we're going to do the create user and it's better best to put the users in you know single quotes Tom stack show single quote at and then we're going to specify our local network so 192.168.254 dot percent sign so that will allow all computers on this local network so identified by and then we're going to put in our password which will be times Tech show123 exclamation point and I forgot my damn simplify again okay so now we've got our user what we want to be able to have that user do stuff right it's it can't create rows and create databases or anything so we want to give it some access so we want to Grant all see if I can type this pre LED privileges on all the options two and we're just going to make this a little bit easier on ourselves we're going to copy this we're going to paste that in there boom just like that and hit and forget my semicolon again okay so now we've got that now let's jump back here and we're going to do the select our user so now we have our user Tom's Tech show we're able to access from this local space here so okay now let's jump back into our Heidi SQL here and we're gonna have Tom's Tech show is the new user that we created and our new password we're going to save that real quick and we're going to click open now this this goes out connects to the database and now you can see we have our database connection we're remote we can see tables and columns and be able to access our database remotely now I can create an application that connects to that database I can do websites I can create them and build them on my desktop using that as my database so works pretty darned well now we're going to go back and do our cleanup we're going to come back here and and we're going to come here and go exit we're going to exit them right DB and then we're going to quit out of let's exit exit out of our SSH session come back here to our sonology Nas disable SSH hit OK and boom we're there so but we still do have access to our uh mariahdb through Heidi SQL because it doesn't use SSH right it uses 3306 in the MySQL Port so that's working exactly as expected all right there we go pretty quick getting set up your Synology set up with a mariahdb able to access the databases and be able to start creating your own databases and tables and uh populating with records of whatever you want your your Movie Database your music database your computers your you know anything that you want your own home Inventory your appliances whatever you want all right well thanks for watching if you got any questions if you feel to make a comment down below I do answer them as much as I can and I make sure to like share and subscribe to this Channel and appreciate everybody who's been subscribing it's been been really good here at on YouTube um thanks everybody for being here and we'll talk to you later bye [Music]
Info
Channel: Tom's Tech Show!
Views: 15,436
Rating: undefined out of 5
Keywords:
Id: 4bLr3fuZO4Q
Channel Id: undefined
Length: 12min 27sec (747 seconds)
Published: Tue Sep 13 2022
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.