mysql

Intermittent JDBC Broken Pipe and Link Failure

泪湿孤枕 提交于 2021-02-08 10:25:56
问题 Excepcion:com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure ... Caused by: java.net.SocketException: Broken pipe I have already read a lot of question similar to this one. So, before declaring this question 'unworthy' let me clarify some things My JDBC link is fully working. No problem of authentication Sql is up and running The max_connections , wich is 300, is never reached The concurrent thread connections are always between 5 and 9 Im using MySQL 5.0.95

jQuery + PHP Autocomplete

和自甴很熟 提交于 2021-02-08 10:25:00
问题 I recently upgraded jQuery from 1.8.x to 1.11.3 because of another dependency, and my autocomplete is now broken. I've been searching this site, Google, etc.. all day and cannot come up with the answer. jQuery-UI version is 1.9.2. To start, I have a PHP file (autocomplete.php) that queries a MySQL database and returns inventory information: <?php require_once 'database.php'; if ($stmt = $con->prepare("select item_no, item_desc_1, item_desc_2 FROM items")) { $stmt->execute(); $name = array();

Ordering non-english letters in MySQL

不问归期 提交于 2021-02-08 10:22:52
问题 I have a client who just sent me the following in regards to order their letters. They are from Finland. In our alphabet the letters å, ä and ö are at the very end of the alphabet. Therefore names starting with those should also be after the letter z, not under "a" or "o". This is the first I've heard of this. Is there a way I could make these letters show at the end of a alphabetical list using MySQL? 回答1: That's probably the collation of that table is utf8_general_ci . Try this, SELECT..

Can't set up phpmyadmin on Mac OS High Sierra

柔情痞子 提交于 2021-02-08 10:17:42
问题 I've been some hours trying to set up phpmyadmin in my MacBook Pro, and I get to have in running in localhost, but when it comes to filling the username and password, I get some errors, usually related to SQL. I was wondering if there is any tutorial to follow so I can set it up properly. Thank you, Álvaro. 回答1: When you're using the default 'host' value in phpMyAdmin, it tries to connect via socket connection ( $cfg['Servers'][$i]['host'] = 'localhost'; is the default, unless you've

OUT parameter of MySQL stored procedure is null after calling stored procedure

我的梦境 提交于 2021-02-08 10:14:49
问题 I've created a stored procedure to return a value for row count of any table I pass in as an "IN" parameter, and output that rowcount to an OUT parameter PROCEDURE `GetCount`(in tblname varchar(255), out rowcount int) BEGIN SET @sql_text1 = concat('SELECT COUNT(*) FROM ',tblname); SET @sql_text2 = concat(@sql_text1,' INTO '); SET @sql_final = concat(@sql_text2, rowcount); PREPARE stmt1 FROM @sql_text1; EXECUTE stmt1; DEALLOCATE PREPARE stmt1; END when I open a query window in MySQL workbench

Apply CSS Styling to PHP output

允我心安 提交于 2021-02-08 10:14:01
问题 The following displays HTML results from the database field "Never". I am trying to apply CSS styling to the output. Here's what I have... echo "<p><strong>Never:</strong> ".$results['Never']."".$results['text']."</p><br />"; Here's what I've tried... echo "<p><strong>Never:</strong> ".$results['<div id="nevermsg">'Never'</div>]."".$results['text']."</p><br />"; Here's my CSS... #nevermsg { color: red; } ...but it's not applying properly. I am receiving a syntax error and a headache. Am I

Storing “redundant” foreign keys to avoid joins

纵然是瞬间 提交于 2021-02-08 10:13:10
问题 I'm designing a database for a web application project and I came to the conclusion I may have few queries that will require a lot of joined tables to just make one check. I'm wondering how bad is it to store the foreign key somewhere on the way to decrease number of joins required for these queries? To give you an example of what I have at this moment: Service => Booking => Transaction => Wallet => BonusOffer I need to check whether the service has been bought with wallet associated with a

Group dependency SQL design

空扰寡人 提交于 2021-02-08 10:12:46
问题 I have an entity which has NOT NULL requirements based on the group it belongs to. For instance... There are three types of churches: Buddhist, Muslim, and Christian. All churches have some common required properties, however, each type of church has additional required properties. All people have some common required properties, however, they have additional required properties based on the church type they belong to. People must belong to one and only one church, however, may change their

Storing “redundant” foreign keys to avoid joins

纵然是瞬间 提交于 2021-02-08 10:12:27
问题 I'm designing a database for a web application project and I came to the conclusion I may have few queries that will require a lot of joined tables to just make one check. I'm wondering how bad is it to store the foreign key somewhere on the way to decrease number of joins required for these queries? To give you an example of what I have at this moment: Service => Booking => Transaction => Wallet => BonusOffer I need to check whether the service has been bought with wallet associated with a

Group dependency SQL design

空扰寡人 提交于 2021-02-08 10:10:10
问题 I have an entity which has NOT NULL requirements based on the group it belongs to. For instance... There are three types of churches: Buddhist, Muslim, and Christian. All churches have some common required properties, however, each type of church has additional required properties. All people have some common required properties, however, they have additional required properties based on the church type they belong to. People must belong to one and only one church, however, may change their