Search the Community
Showing results for tags 'mysql'.
-
Friends, This is the 1st time I am setting up a dedicated server at my home using RPi 4 (with Static IP). I am also installing Docker to host and manage few sites and WordPress installations. (mostly my previous works as demo which are no longer available in live sites) I have a little doubt regarding Docker and MySQL, how to setup? I do not want that every container uses its own MySQL instance which will take up too much memory and space of my RPi 4. I want to run single common MySQL instance. Option 1: Run MySQL as a dedicated Docker Container? But, I might need MySQL access from outside Docker, like some Linux scripts, some database mirroring etc. Option 2: Install and run MySQL as local (traditional Linux installation) Will it be easy to access this MySQL by the Docker Containers? Pls suggest.
-
Upgrading from a PC I bought 2nd hand Budget (including currency): $2-5000CAD Country: canada Games, programs or workloads that it will be used for: for school I use visual studio code, visual studio, MySQL server management studio, Microsoft SQL server, and GitHub desktop for programming projects for school. For designing projects at school I use Adobe suite, primarily Photoshop and illustrator. I often check dev tools among several different browsers to confirm that my web code did what it was supposed to do. For gaming, I play Minecraft, Minecraft dungeons and Apex. Although I've been wanting to get more into the side of Minecraft that users often encounter a significant lag or drop in fps. I also use my oculus quest 2 with my PC by linking via a quest rift cable or a usb c cable essentially(I think that's what the cable is called) Other consoles I own: - PS4 - Nintendo Switch Pro (I think that's the newest ones model name) - Oculus Quest 2 Only mentioning my consoles in the event I want to connect them to my PC for something in the future. My current phone is a Google pixel 6 Pro, and my headphones are the newer SteelSeries artis nova pro wired, and I'm stating this for the same reason as the consoles above. $Funding$ Currently because of a disability grant I qualify for because of my epilepsy, I am allowed $20,000 max in my lifetime for money that's free basically for a "computer package" this amount isn't provided all at once instead it is given in 4 parts and I have recieved $5000 already. Other details Current Laptop: Acer Nitro (Also have 4 other laptops: Lenovo, chromebook, some Toshiba brick thing, and a crappy $100 one I still have) Current PC Motherboard: Gigabyte GA-H67A-UD3H-B3 ATX LGA1155 Motherboard Memory: - Corsair Vengeance 16 GB (4 x 4 GB) DDR3-1600 CL9 Memory *There are 2 plugged into motherboard currently* - G.Skill Ripjaws X 16 GB (2 x 8 GB) DDR3-1600 CL9 Memory *There is 1 plugged in* Case: - Antec P20C ATX Mid Tower Case Power Supply: - Cooler Master MWE White V2 230V 400 W 80+ Certified ATX Power Supply Operating System: Microsoft Windows 11 Home OEM - DVD 64-bit (existing parts lists, whether any peripherals are needed, what you're upgrading from, when you're going to buy, what resolution and refresh rate you want to play at, etc): Link to my current PC Components: https://pcpartpicker.com/list/W6LmXy there are some I haven't figured out what they are fyi, and I'm having issues with power to my keyboard and mouse with the PC (I've checked that they still work when connecting to my laptop), I'm also troubleshooting the connection to my monitor that that I can run a user benchmark test on it and then update this post accordingly.
- 13 replies
-
- mysql
- microsoft sql server
- (and 4 more)
-
Budget (including currency): Country: Games, programs or workloads that it will be used for: Other details (existing parts lists, whether any peripherals are needed, what you're upgrading from, when you're going to buy, what resolution and refresh rate you want to play at, etc): Upgrading from a PC I bought 2nd hand Budget (including currency): $2-5000CAD Country: canada Games, programs or workloads that it will be used for: for school I use visual studio code, visual studio, MySQL server management studio, Microsoft SQL server, and GitHub desktop for programming projects for school. For designing projects at school I use Adobe suite, primarily Photoshop and illustrator. I often check dev tools among several different browsers to confirm that my web code did what it was supposed to do. For gaming, I play Minecraft, Minecraft dungeons and Apex. Although I've been wanting to get more into the side of Minecraft that users often encounter a significant lag or drop in fps. I also use my oculus quest 2 with my PC by linking via a quest rift cable or a usb c cable essentially(I think that's what the cable is called) Other consoles I own: - PS4 - Nintendo Switch Pro (I think that's the newest ones model name) - Oculus Quest 2 Only mentioning my consoles in the event I want to connect them to my PC for something in the future. My current phone is a Google pixel 6 Pro, and my headphones are the newer SteelSeries artis nova pro wired, and I'm stating this for the same reason as the consoles above. $Funding$ Currently because of a disability grant I qualify for because of my epilepsy, I am allowed $20,000 max in my lifetime for money that's free basically for a "computer package" this amount isn't provided all at once instead it is given in 4 parts and I have recieved $5000 already. Other details Current Laptop: Acer Nitro (Also have 4 other laptops: Lenovo, chromebook, some Toshiba brick thing, and a crappy $100 one I still have) Current PC Motherboard: Gigabyte GA-H67A-UD3H-B3 ATX LGA1155 Motherboard Memory: - Corsair Vengeance 16 GB (4 x 4 GB) DDR3-1600 CL9 Memory *There are 2 plugged into motherboard currently* - G.Skill Ripjaws X 16 GB (2 x 8 GB) DDR3-1600 CL9 Memory *There is 1 plugged in* Case: - Antec P20C ATX Mid Tower Case Power Supply: - Cooler Master MWE White V2 230V 400 W 80+ Certified ATX Power Supply Operating System: Microsoft Windows 11 Home OEM - DVD 64-bit (existing parts lists, whether any peripherals are needed, what you're upgrading from, when you're going to buy, what resolution and refresh rate you want to play at, etc): Link to my current PC Components: https://pcpartpicker.com/list/W6LmXy there are some I haven't figured out what they are fyi, and I'm having issues with power to my keyboard and mouse with the PC (I've checked that they still work when connecting to my laptop), I'm also troubleshooting the connection to my monitor that that I can run a user benchmark test on it and then update this post accordingly.
- 13 replies
-
so here is the schema:for the json: { "ts": 1677330162, "uuid": "75e4917d-69cd-49e1-963f-380ea031a88b", "moderators": [ { "userId": 000001, "timeAdded": 1677332262, "permissions": { "all": true, "tag": true, "mail": true, "posts": true, "access": true, "config": true, "analytics": true } } ], "lastUpdated": 1677332262 } which is stored as i have tried all of these queries: https://stackoverflow.com/questions/38797627/query-a-json-column-with-an-array-of-object-in-mysql and nothing is working, mysql doesnt give an error, just no results. my last query i tried: SELECT * FROM community__sharded WHERE data->'$.moderators.*.userId' = json_array(000001); i have no idea where im going wrong, can i get some help?
-
So I am making a small school project, where I need to make a website which is a website with a Create, Read, Update and Delete functions, but I also need a search function. I made the website for the most part, but I am having a hard time making a search function on my website. Is there anyway I can make a search function onto my website? My code and picture of my website is here: https://imgur.com/a/4bGip7V
-
My friend made tables etc. to a website we're making in MySql. We made tables such as product, person, address and some other stuff. How do we implement it into a form? So we can have it displayed on the website?
-
So I am new at coding, and we needed to make a simple website with some simple functions. Everything seems to work and stuff, but I can't really find the reason why there is text where it says "Undefined Array Key" Isn't there a way to remove this? Everything in my database and in the code should have the same name.
-
I have these three tables in PHPMyAdmin MySQL. I am trying to make a website where I can add a product to a cart. Products - [Id, Name, Description, Price] Carts/Lists [Id, TotalPrice] ProductsInCarts [CartId, ProductId, Quantity, Price, TotalPrice] But I have no idea how to relate them or how many characters they should allow, neither do I know what type or attribute should be added. I was thinking that products are added to basket in ProductsInCarts where CartId relates to Id in Cart Table, ProductId to Id in Products etc. But I am not sure how to do it.
- 6 replies
-
- mysql
- phpmyadmin
- (and 4 more)
-
I want to create a little shopping website for a school project. I need to have some products, where I can add them to the shopping cart. I know how to make the products, but I don't know how to make a button where I can add the product to the shopping cart. I also want a shopping cart where I can see the items, delete them. I also need some kind of create profile area, where I can create data, search for data, delete data, and update data. If I want to add my name to a list, then I would need to add it to a list and update the name, delete the name, and search for lastname for example and find the data. I tried finding guides, but everything I found was too complex and had too many things. I don't know if there is any guides to this, but if anyone knows, then I would really appreciate a link or something.
-
Hi, I've taken the 'poor guy" approach and I've made a docker image to backup a remote MySQL/MariaDB server into a remote git repository (ie. GitLab, GitHub, etc). I'd like to listen to your opinion on this form of backup, potential security threats, optimization tips, etc And, its free and open source. I'm open to Pull/Merge requests: https://gitlab.com/franciscocb/mariadb-git-backup-docker
-
- programming
- development
-
(and 4 more)
Tagged with:
-
-
I have an Unraid NAS and I want to run a MySQL database from it via docker for a WordPress site I'm working on. I pulled the MySQL docker and according to the documentation on Docker Hub, I just run `docker run --name some-mysql -e MYSQL_ROOT_PASSWORD=my-secret-pw -d mysql:tag` when I run that, (with the password and database name instead of placeholders) it does create the database but I don't know what the username is. Wordpress is running in a different docker container and won't accept the username root with the password I made. What would the username be?
-
Hi I keep getting this error while trying to either configure or even remove mysql-server-8.0 and cant seem to find anything online. Setting up mysql-server-8.0 (8.0.22-0ubuntu0.20.04.3) ... Failed to stop mysql.service: Unit mysql.service not loaded. invoke-rc.d: initscript mysql, action "stop" failed. update-alternatives: error: alternative path /etc/mysql/mysql.cnf doesn't exist dpkg: error processing package mysql-server-8.0 (--configure): installed mysql-server-8.0 package post-installation script subprocess returned error exit status 2 Errors were encountered while processing: mysql-server-8.0
-
How to add MySQL JDBC Driver to Netbeans correctly? Everytime i create a new project of Java with Ant and try to add MySQL JDBC Driver, i never find it. I have installed xampp and mysql from this https://dev.mysql.com/downloads/windows/installer/8.0.html And when i created a library manually :MySQL JDBC Driver and added MySQL Connector/J into it, it worked but not fully 100%, i mean there were some bugs It may a silly question, but i need help since eveytime i search this on internet and all websites magically have MySQL JDBC Driver in their libraries, and don't even tell how it appears. Thanks you.
-
Hello, after watching LTT's stream today where Linus told to hop into the forum to ask questions about servers, I decided to give it a try. About me: I'm a Windows user, and I do have some technical knowledge. I don't know enough about Linux, but I did use Ubuntu (which is probably irrelevant). I have a few questions regarding my plan to make a DIY Server PC. I'm going to upgrade my PC and I'm gonna repurpose my current one as a server. Server's "would-be" Specs: - Intel(R) Core(TM) i7-6700 CPU @ 3.40GHz - 8GB DDR4 RAM - 3TB HDD Storage - Intel(R) HD Graphics 530 (No external GPU) My plan for the server's use cases are: - hosting a data website I have (currently hosted on my current PC, built on laravel, have own custom domain) - set up Jellyfin and Navidrome/Koel to stream media/music - use some other self-hosted apps like NextCloud and password manager Here are some questions I'm meaning to ask: How do I actually run the server without user intervention, or with any other peripherals not connected? Do I need a separate SSD to run the server? I heard USB flash sticks are enough! Is it reliable information? What are some OS options than I can use? (TrueNAS core, etc) Is TrueNAS like an OS? I don't need any NAS like storage with raid/parity, other than maybe a SMB network location share. Aka, backup not important as it's mostly for media files and everything on the website is already on GitHub. Does Docker goes inside TrueNAS? How can I update my Laravel files from GitHub automatically? I've watched some YouTube channels like NetworkChuck and Raid Owl, but I'm still not sure how I should proceed. Any links to channels, videos, documentations will be helpful. As this is a passion project I don't want to spend much on any other hardware/subscriptions other than those I already have. Also any other tips, suggestions or experiences are welcome. I might have more questions, but for now this is all. Thank you!
-
Tried queries: //v1 SELECT ( SELECT chat_id FROM Chats_members WHERE `group_user_id` = **INT** ) AS chat_id,( SELECT time FROM messages WHERE chat_id = chat_id ORDER BY time DESC LIMIT 500 ) as time; /** only allows 1 result otherwise returns error*/ //v2 SELECT Chats_members.chat_id, Chats_members.group_user_id AS member, messages.time AS TIME FROM Chats_members, messages WHERE Chats_members.group_user_id = **INT** GROUP BY Chats_members.chat_id; /** there should be 3 total. the time is in ms the only issue with v2 is, the time is the same for all of them when each one should have a different time should be: (for each) random time, not all the same im using Mysql testing data: CREATE TABLE `Chats_members` ( `member_id` bigint NOT NULL, `chat_id` bigint NOT NULL, `group_user_id` bigint NOT NULL, `added_by_user` bigint NOT NULL, `time` bigint NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; CREATE TABLE `messages` ( `message_id` bigint NOT NULL, `chat_id` bigint NOT NULL, `self_id` bigint NOT NULL, `message` text NOT NULL, `self_deleted` enum('true','false') NOT NULL, `time` bigint NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; INSERT INTO `Chats_members` (`member_id`, `chat_id`, `group_user_id`, `added_by_user`, `time`) VALUES (1, 1, 459937721, 459937721, 1657553135); ALTER TABLE `Chats_members` ADD PRIMARY KEY (`member_id`), ADD UNIQUE KEY `member_id` (`member_id`), ADD KEY `chat_id` (`chat_id`,`group_user_id`); INSERT INTO `messages` (`message_id`, `chat_id`, `self_id`, `message`, `self_deleted`, `time`) VALUES (1, 1, 26618662357432, 'msg', 'false', 1657553237302), (2, 1, 459937721, 'msg', 'false', 1657553248586), (3, 1, 404, 'msg', 'msg', 1657553341414), (62, 3, 459937721, 'msg', 'false', 1657763308852), (63, 3, 459937721, 'msg', 'false', 1657777720634), (64, 1, 459937721, 'msg', 'false', 1657846608972), (65, 1, 26618662357432, 'msg', 'false', 1657846608972); ALTER TABLE `messages` ADD PRIMARY KEY (`message_id`), ADD UNIQUE KEY `message_id` (`message_id`), ADD KEY `chat_id` (`chat_id`,`self_id`); ALTER TABLE `messages` MODIFY `message_id` bigint NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=66; COMMIT;
-
Hello everyone. I have a MySQL server that's running 24/7, always working. Currently a 'Samsung 980 PRO SSD PCIe 4.0 NVMe M.2 - 1TB' is installed, but it was a very bad choice. It can't keep up. It is installed in an Intel NUC I5-10210U. I need something that isn't limited by a small cache or lackluster controller, also at least 1TB, preferably close to that. Whether it's M.2 or 2.5" is all the same to me. Maybe 2.5" NVMe? I'm currently researching it myself as well, but your help would be greatly appreciated.
-
I'm trying to make a foreign key but MySQL keeps telling me there is a duplicate key and I have no clue why or where there is a duplicate. Operation failed: There was an error while applying the SQL script to the database. Executing: ALTER TABLE `stemmy`.`stemmen` ADD CONSTRAINT `idPartij` FOREIGN KEY (`idPartij`) REFERENCES `stemmy`.`partijen` (`idPartij`) ON DELETE NO ACTION ON UPDATE NO ACTION; ERROR 1005: Can't create table `stemmy`.`stemmen` (errno: 121 "Duplicate key on write or update") SQL Statement: ALTER TABLE `stemmy`.`stemmen` ADD CONSTRAINT `idPartij` FOREIGN KEY (`idPartij`) REFERENCES `stemmy`.`partijen` (`idPartij`) ON DELETE NO ACTION ON UPDATE NO ACTION
- 1 reply
-
- mysql
- foreign key
-
(and 1 more)
Tagged with:
-
I am trying to get a php file to show the picture in a table and not just the file name listed in mysql. This is what i have now: if($row = $sth->fetch()) { ?> <br><br> <table> <tr> <th>Bilde</th> <th>Navn</th> <th>Rase</th> <th>Beskrivelse</th> </tr> <tr> <td><?php echo $row->bilde;?></td> ------------------------------------------------This is where I would like the picture to be shown. Now it just shows me the file name. <td><?php echo $row->navn;?></td> <td><?php echo $row->rase;?></td> <td><?php echo $row->beskrivelse;?></td> </tr> </table> <?php
-
I'm trying to create an overview of the Lord of The Rings movies where you can click on one of the movies and get an overview of witch characters are in that movie. I have managed to get an overview of the races in the movies where you can click on one of the races and see the characters in that race. This is the diagram layout in mysql: This is the PHP code that gives me an overview of the races once I press the link in the php document that gives me an overview of the races with links. <?php if (isset($_GET["rase_id"])) { $rase_id =$_GET["rase_id"]; $rase =$_GET["rase"]; } else { die("Du har ikke angitt en rase_id."); } include "kobling_midgard.php"; $sql = "SELECT * FROM midgard.karakterer where karakterer.rase_id=$rase_id"; $resultat = $kobling->query($sql); echo "<table>"; echo "<tr>"; echo "<th>Bilde</th>"; echo "<th>Navn</th>"; echo "<th>Beskrivelse</th>"; echo "</tr>"; while ($rad = $resultat->fetch_assoc()) { $bilde = $rad["bilde"]; $navn = $rad["navn"]; $beskrivelse = $rad["beskrivelse"]; echo "<tr>"; echo "<td><img src='bilder/$bilde' alt='karakterer'></td>"; echo "<td>$navn</td>"; echo "<td>$beskrivelse</td>"; echo "</tr>"; } echo "</table>"; ?> This is the code I have for making the connection between the "film", "deltakelse" and "karakterer" tables. <?php if (isset($_GET["film_id"])) { $film_id =$_GET["film_id"]; } else { die("Du har ikke angitt en karakter."); } include "kobling_midgard.php"; $sql = "SELECT * FROM midgard.deltakelse where deltakelse.film_id=$film_id "; $resultat = $kobling->query($sql); echo "<table>"; echo "<tr>"; echo "<th>Navn</th>"; echo "<th>Beskrivelse</th>"; echo "</tr>"; while ($rad = $resultat->fetch_assoc()) { $navn = $rad["navn"]; $beskrivelse = $rad["beskrivelse"]; echo "<tr>"; echo "<td>$navn</td>"; echo "<td>$beskrivelse</td>"; echo "</tr>"; } echo "</table>"; ?>
-
I created a function that checks if a user exist in my data base: function UserExist($gid) { $query = SQLWrapper()->prepare("SELECT ID FROM Users WHERE gid = ?"); $query->execute([$gid]); $info = $query->fetch(); if(empty($info)) { return false; } else { return true; } } But it gives me this error: Uncaught Error: Call to a member function fetch() on bool Any ideas as to why?
-
I have a PHP file that has a button to updat the info in my database. Once the button is pressed it uses another PHP file to run the update in the database. I am trying to make it redirect me to a php file with a table containing the info in the database. This is what I have now. It just displays text saying that the update was successful. I would like it to redirect me to the PHP file containing the table. I would like to avoid using URL redirects. if($kobling->query($sql)) { echo "Update successful"; } else { echo "Something went wrong $sql ($kobling->error)."; }
-
Hello people! I have seen people getting really confused about server configuration etc even after seeing online tutorials. So i have decided to make this website for people like them who are really afraid of setting up such things. Please review and share my site to as many people as u can! will help them a lot! Thanks! site link: <content removed by staff>
-
I have used both Nextcloud and Owncloud and i seem to be coming into the same problems for both. After i configure Apache, PHP and MySQL i get brought to the web page where it should work. I watched many videos and read hundreds of articles online explaining different ways to set these up but they all keep giving me the same problems. i keep getting a bunch of gibberish when it should be asking for my login info. What i was using before was Freenas. I had the plugin for Nextcloud installed i had the jails configured correctly everything should have been working but it was bringing up the login page but it said that there was something wrong with MySQL an PHP setup. i scrapped that idea and now i tried installing Ubuntu 18.04 LTS terminal on my Windows 10 machine. I've tried changing which versions of PHP ans MySQL, i tried changing to a different version of owncloud from 10.0.4 to 10.0.10 but it keeps giving me the same problems. Im not super intelligent when it comes to Linux but every article has not worked for me. and i do not know why it is not working for me Any help would be amazing, Thanks.
-
Hey guys, I had a though the other day and wondered if it’s possible to have more than one Raspberry Pi as a web server, and one or more "clones" with the exact same website as backup sites? You could have one Pi at home and another at work or at a friends house for example. So that in case of a fire or theft example and one of the Raspberry Pi’s are down, then the other Pi would automatically take over and keep the site up. Thanks for any ideas or tips:)
- 32 replies
-
- raspberry pi
- web server
-
(and 4 more)
Tagged with: